David-Sarah Hopwood wrote:
> C-family languages have DO..WHILE rather than DO..UNTIL, of course.
> The (small) advantages of this are:
> - familiarity to C, C++, Java and C# programmers,
> - changing a loop between the WHILE and DO..WHILE forms does not
> require inverting the condition.
>
> I briefly looked at uses of 'do {...} while (condition)' in my C code,
> and it did not seem like "negative" conditions were generally any more
> common than "positive" ones (i.e. that the code would have been made
> clearer by being able to invert the condition).
Actually I probably didn't have enough uses of 'do..while' to support
this contention, but a Google code search for
lang:^(c|c#|c\+\+|java|objectivec)$ }\swhile\s -"} while (0"
supports it.
<http://www.google.com/codesearch?q=+lang:%5E(c%7Cc%23%7Cc%5C%2B%5C%2B%7Cjava%7Cobjectivec)%24+%7D%5Cswhile%5Cs+-%22%7D+while+(0%22>
--
David-Sarah Hopwood
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev