Possible enhancement: Concise return statements
Andrej Mitrovic
andrej.mitrovich at gmail.com
Mon Aug 15 12:08:37 PDT 2011
On 8/15/11, Walter Bright <newshound2 at digitalmars.com> wrote:
>
> for (int i = 0; i < 10; i++);
> ... do this ...
>
> which has cost at least one expert developer I know an entire afternoon
> staring
> at it convinced there was a compiler bug because his loop executed only
> once.
>
> (And this is why D disallows this syntax.)
>
I've been meaning to say, DMD caught me doing this at least 2 dozen
times over the last year or so. Adding this to the language was a
great move.
More information about the Digitalmars-d
mailing list