Breaking ";" rule with lambda functions

pascal111 judas.the.messiah.111 at gmail.com
Mon Aug 1 18:01:20 UTC 2022


On Monday, 1 August 2022 at 17:01:33 UTC, frame wrote:
> On Monday, 1 August 2022 at 14:15:31 UTC, pascal111 wrote:
>> [...]
>
> In C ";" is a termination character, in D is more like to 
> separate statements.
>
> The lexer wouldn't need ";" for most cases like JavaScript and 
> the expression syntax without ";" is better to read anyway.
>
> However, the common settlement is to require a ";" where it 
> makes logical sense and where it's still needed for the lexer. 
> So we have this.

It can be consider as a tolerance with traditional rules. The 
compiler won't accept lambda function with a ";", so I have to 
leave it.


More information about the Digitalmars-d-learn mailing list