Dangling if

bearophile bearophileHUGS at lycos.com
Mon Oct 1 03:50:02 PDT 2012


F i L:

> This is exactly why I think the '{}' brackets "should" be a 
> requirement and not the '()' brackets:
>
>     if a == b { doSomething(); }
>
>     if a == b
>         { doSomething(); }
>
>     if a == b
>     {
>         doSomething();
>         doSomethingElse();
>     }
>
> I know this will never happen in D, but it's how it should be, 
> IMO.

This is what Go designers think.

Bye,
bearophile


More information about the Digitalmars-d mailing list