Mail Archives: djgpp/2000/08/04/09:00:21
eglebbk AT dds DOT nl (Evert Glebbeek) wrote:
[SNIP]
>>building the whole nest in a function and return?
>No, this is the way to do it. I always split my code in small
>functions that perform logical tasks, collision detection would be one
>of these.
>>Picture yourself reading that code!
>Doing it all the time. Actually, I find something like
>
>if (sprites_collide(sprite1, sprite2))
> do_mega_big_explosion();
>
Ok, I can see that. But what you have here is an example of
how easy programming can be if you use exceptionally good
libraries like Allegro. All you have to supply to that
function are two tiny arguments, that already contain all
the information you will need in that function. But often
you will find yourself passing endless arguments back and
forth.
[SNIP]
>Well, all I can do is explain why I don't use goto. If you
>really feel you *have* to use goto, sure, go ahead.
>
Can we settle on this: Generally discouraging the use of
goto would be going to far, just like demanding a goto in
each and every case of breaking out of a nested loop.
I guess what got me so worked up in the first place, was the
statement that goto is evil and you should never ever use
it. Just like that, no reason given.
--
Manni
"Life would be much easier if I had the source code."
- Raw text -