paren-free call expressions
dxgriffiths at gmail.com
Thu May 19 00:45:27 PDT 2011
I'm new to this list but I was writing some notes about paren-free calls this morning and thought they might be relevant.
The trouble with paren-free calls, as implemented in CoffeeScript and others:
- they overload the space character, making it mean something different in only a small fraction of cases.
- they break down whenever calls are nested or part of another expression (requiring a fall-back to explicit parentheses).
- they also make certain other things impossible to write, like named function declarations (blah -> becomes blah(->)).
The first point is major, in my opinion. If the goal is to have an argument list opener that doesn't require an explicit close, then some other character(s) would be a better solution than forcing people to read possible double-meanings into every space they see.
More information about the es-discuss