for in D versus C and C++
Walter Bright
newshound1 at digitalmars.com
Fri Mar 20 11:31:32 PDT 2009
Rioshin an'Harthen wrote:
> "Walter Bright" <newshound1 at digitalmars.com> kirjoitti viestissä
>> I doubt anyone types { } by accident.
>
> I have a habit of indenting the semicolon on the following line, if I
> wanted a blank statement, like
>
> for (...; ...; ...)
> ;
>
> Much clearer in my opinion than having it on the same line as the for
> construct.
Yes, that's ok, too. The only issue with it as far as working it into
the language goes is then the parser and lexer do not have a clean
separation - whitespace has meaning in one case.
More information about the Digitalmars-d
mailing list