Breaking ";" rule with lambda functions

pascal111 judas.the.messiah.111 at gmail.com
Mon Aug 1 21:43:55 UTC 2022


On Monday, 1 August 2022 at 21:35:19 UTC, Ivan Kazmenko wrote:
> On Monday, 1 August 2022 at 20:36:12 UTC, pascal111 wrote:
>> My complaint is about that a function is not a same as an 
>> expression that functions return values, but expressions being 
>> evaluated to provide values.
>
> An analogy.
>
> With a ternary expression, we write:
> `x = (cond ? a : b);`
> The traditional look of it is:
> `if (cond) x = a; else x = b;`
> Note how we have a semicolon after `x = a` in the latter form, 
> but can't have it in the former.
>
> Ivan Kazmenko.

Ok! it's not reasonable that you are all wrong and I'm the only 
right. I think I agree now with you that (maybe) lambda function 
is an expression. :)


More information about the Digitalmars-d-learn mailing list