Loop iterator - example.txt
Unknown W. Brackets
unknown at simplemachines.org
Sun Apr 30 19:06:38 PDT 2006
I can also show you awful OOP. By your logic, OOP is thereby flawed and
should never be used.
Yet, that is not a good assertion. Just because a goto can be used to
do evil does not mean it is, necessarily, evil - as long as it is used
only for good. Just like anything else.
But obviously, this is not good and evil. Still.
-[Unknown]
> I *do* understand them, and I also do know, that they are useful and
> whatnot. Still, I don't like them - they are a relict of early C times.
> But now we've got neat, mighty conditional loops - what do we need GOTOs
> for?
>
> A friend of mine once wrote such code:
>
> <code>
> label:
> doSomething( );
>
> if ( condition )
> goto label;
> </code>
>
> That *is* a do-while loop.
>
> <code>
> do {
> doSomething( );
> } while ( condition )
> </code>
>
> Effectively, those two construct are the same, but the second one is,
> IMO, far better readable (readable as in recognization of what a program
> is doing).
>
> Regards,
> Alexander Panek
More information about the Digitalmars-d
mailing list