Errors in TDPL

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Thu Jun 24 08:50:57 PDT 2010


On Wed, 23 Jun 2010 11:51:40 -0500, Andrei Alexandrescu wrote:

> 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?


Absolutely.

-Lars


More information about the Digitalmars-d mailing list