why ; ?

Bruce Adams tortoise_74 at yeah.who.co.uk
Sat May 10 05:24:58 PDT 2008


On Sat, 10 May 2008 11:58:41 +0100, Michael Neumann <mneumann at ntecs.de>  
wrote:

> 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

Reducing bugs from syntax errors is one of several ways to improve
programmer productivity. Its much less important than good semantics  
though.



More information about the Digitalmars-d mailing list