|
|
|
|
|
by kennywinker
1739 days ago
|
|
Examples 3 and 4 are cursed, to my eye. Curly braces denote a block, so why is there some magic syntax inside the block that denotes that this block happens to be a lambda? surely the block is the closure itself. The syntax to say what the block is goes outside. Imagine if i wrote a conditional like that: if x > y { return x; } else { return y; }
as { if x > y; return x; } { else; return y; }
It completely erases the usefulness of {}, and is cursed, cursed I say! And I’m looking at you, rust, swift, ruby, etc. |
|