Proposal of a general do-while loop

Henning Hasemann hhasemann at web.de
Tue Jul 17 14:16:18 PDT 2007


I agree, too.

The goto thingy looks quite readable, but depending on how long your
loop is it might not be in practice. Also it would be the first time
I'd use goto.

The for-thingy as well as the doWhile mixin (which per se is *really*
cool) loose some expressiveness. Imagine all code blocks would be
longer. How long would you need to understand the meaning compared to
the proposed construct?

Also I dont like making assignment-stuff in the condition-part of a
while or for loop. I once tried it with this and if you have some
not-too-short variable/function/method names you can easily get a
while-condition thats about 5 lines long which is a pain in the eye.

Votes++;

// Henning

-- 
GPG Public Key:
http://keyserver.ganneff.de:11371/pks/lookup?op=get&search=0xDDD6D36D41911851
Fingerprint: 344F 4072 F038 BB9E B35D  E6AB DDD6 D36D 4191 1851



More information about the Digitalmars-d mailing list