Semicolon?

Walter Bright newshound2 at digitalmars.com
Thu Apr 1 07:07:54 UTC 2021


On 3/31/2021 7:40 PM, Andrei Alexandrescu wrote:
> There are a few cases that would be ambiguous. Not sure how realistic:
> 
> auto a = b;
> *c;
> 
> Without semicolons the semantics would be different.

D disallows pointless expressions like *c; so it would parse as b*c. Not really 
helpful in diagnosing the problem.

It's one of those perennial good ideas, like implicit declarations, that 
resurface every couple of years. It isn't obvious why they are a bad idea, until 
you work with them for a while.


More information about the Digitalmars-d mailing list