Re: [AD] got rid of END_OF_MAIN()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


If that's the consensus of the Allegro developers then I guess that's the end of it.

But....

I believe this has been discussed before, and that this requirement isn't acceptable.

If you mean from quite a while before, then ok. But if you mean when it was just discussed a few days ago, what I saw was one person said it wasn't acceptable and one said it was fine and then it was dropped.

 If main(void) is valid C, it should continue to be valid.

I don't understand this. There's no need to make everything that's valid C be valid for Allegro. I mean, currently this:

int main(int argc, char *argv[])
{ whatever.... }

(without the END_OF_MAIN) is valid C but it doesn't work with Allegro. Half the people writing programs using Allegro would be writing their programs with argc and argv regardless of whether Allegro requires it. NOBODY would be putting END_OF_MAIN() at the end of their main function if Allegro didn't require it. Requiring people to use argc and argv doesn't require people to do anything they're not already familiar with and their program ends up looking like a normal C program. Requiring people to use END_OF_MAIN requires people to learn and remember something new and their program looks just that much more nasty and krufty because of it.

Not only that, but if all you do is:
#define main blah...
it'll also break the use of any variable called main, eg. in structs or classes.

Unless you know something I don't this is irrelevant. Allegro already does
#define main _mangled_main
So how is my way any different?

If you need a prove of concept, this is basically the way SDL does it and as far as I know nobody has any problems with not being able to write int main(void).

Mike Benfield





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/