On Monday, 1 August 2022 at 15:08:04 UTC, ag0aep6g wrote:
On Monday, 1 August 2022 at 14:52:03 UTC, pascal111 wrote:
If `foo => bar` == `(foo) { return bar; }`, then `foo => bar`
is a function. "=>" is not an operator, it's a special symbol
for lambda "function".
If A == B, so A's types is the same of B's type. How can it be
withstanding `foo => bar` == `foo => bar` == `(foo) { return
bar; }` and `foo => bar` is an expression and the other is a
function?!! no sense.
`foo => bar` and `(foo) { return bar; }` are both function
literals, and they're both expressions. The concepts are not
mutually exclusive.
Surely, because it seems that you are real man, your word must be
taken. Isn't `(foo) { return bar; }` an anonymous function or am
I a wrong?!! It IS a function, not an expression.