Errors in TDPL

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jun 23 09:51:40 PDT 2010


On 06/23/2010 11:40 AM, Walter Bright wrote:
> Jonathan M Davis wrote:
>> Well, while I, personally, would put a semicolon there (it feels naked
>> to me without one), dmd doesn't actually seem to require it. But TDPL
>> says that the semicolon is required. So, it does appear to be an error
>> in the text. Of course, there's no helping his pet peeve regardless,
>> but the semicolon doesn't appear to be required.
>
> For reference for this discussion, the current grammar does not require it:
>
> http://www.digitalmars.com/d/2.0/statement.html#DoStatement
>
> The C grammar does require it:
>
> do statement while ( expression ) ;

I mistakingly assumed D followed C in that regard. Given the argument 
stated in this thread (that absent semicolons require more context to be 
absorbed while reading), do you agree that D should make the semicolon 
required?

Andrei


More information about the Digitalmars-d mailing list