On Monday, 1 August 2022 at 14:39:17 UTC, pascal111 wrote:
On Monday, 1 August 2022 at 14:34:45 UTC, ag0aep6g wrote:
[...]
`a => a > 0` is not a statement. It's an expression.

But it is still a "function", and functions make statements!! It's not a normal expression.

It's a normal expression.

`foo => bar` is an expression that doesn't involve any statement. So there's no semicolon.

`(foo) { return bar; }` does contain a return statement. As you expect, there's a semicolon. But it's still an expression like any other.

Reply via email to