why ; ?

Michael Neumann mneumann at ntecs.de
Sat May 10 03:58:41 PDT 2008


Bruce Adams wrote:
 > I thought D had dropped single statement if's for this very reason. I
 > must be mistaken. Many a (C) coding
 > style guide strongly encourages embracing even single statements in
 > constructs like this.
 >
 > You can go further with the idea. After all you can casuse ambiguity
 > between e.g nested loops as well.
 >
 > if (a) {
 >   while(b) {c}
 > }
 >
 > versus
 >
 > if (a)
 >    while(b)
 >       c
 >    wend
 > fi
 >
 > or whatever.
 > You can mess around with this stuff forever without increasing
 > programmer productivity signficantly.

It's not about programm productivity, but about redundancy :)

But then there is still Ada for those that need that redundancy to
prevent bugs. Or just don't write too deeply nested code ;-)

Regards,

   Michael



More information about the Digitalmars-d mailing list