From: Oliver Hunt [[email protected]]

> I guess this could be lexically unambiguous, but i'm unconvinced that the 
> "win" of losing two characters in the strictly less common no parameters is 
> worth the syntactic confusion

No-parameter functions are pretty darn common, especially if you count cases 
where the function might normally take parameters but you don't care about them 
in this case.

A very common case is in unit testing libraries, which would look like so:

```js
describe("addition", => {
  it("should work", => {
    expect(2 + 2).toEqual(4);
  });
});
```

> I think an optional tail would be a huge coding hazard - a typo could result 
> in bizarre behaviour

This has not been my experience in CoffeeScript, and I haven't heard of such 
experiences from any of the language's other users either.

> how would `a => b => c` produce?

`a => (b => c)` is the only option; `(a => b) => c` is not syntactically valid 
since `(a => b)` is not a valid `ArrowParameters`.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to