Tom Worster wrote on 03/10/2015 21:33:
when the grammar starts with function(args), it seems the main
difference from existing grammar is to make the curly braces when
there's only one statement in the function block.
in other contexts i had the impression that things like
if (bool-expr) statement;
and similar were going out of fashion fast.
Yeah, I'm not sure I agree with this line in the RFC at all:
> It also avoids the use of |{}| which means that writing closures
in-line is less painful.
Avoiding the *return* statement I'm right behind, but if the => is no
longer acting like an operator (which with the function keyword in
place, it's really not), some extra brackets around the expression seem
like they'd improve readability.
What about moving the => into the function(...) block?
function($foo) => $x * $y
vs
function($foo => $x * $y)