3 ms·
I agree, and I don't want to simplify CS, but rather JS. The thing that bothers me about CoffeeScript is the call syntax without parenthesis but with commas - w
by arnarbi 14y ago
I agree, and I don't want to simplify CS, but rather JS. The thing that bothers me about CoffeeScript is the call syntax without parenthesis but with commas - which seems to me the main source of "surprises".
The main benefit of it however is allowing you to write anonymous function arguments without chasing closing delimiters.
I would like something that lies in between JS and CS, with that particular benefit but without the weird grammar.
- mratzloff 14y agoMy solution above (naming functions) is one solution to the problem. Wrapping ambiguous objects or arrays is another: f 1, 2, { foo: "bla" bar: "bla" }, (error, result) -> # do something with result For a series of function parameters, the leading comma is another: f.asyncMap (item) -> foo item , (error, result) -> # do something with result
- arnarbi 14y agof.asyncMap (item) -> foo item , (error, result) -> # do something with result The readability of that is terrible. I (and most people) can easily figure out how to make myself understood to the parser, that's not an issue at all. The itch that CS scratches is severe, but I believe there is an opportunity to have something much better in terms of readability and predictability.
- mratzloff 14y agoWhich is why it was the third alternative, and not the first. :-)