I agree a missing body is usually weird; the only case that really makes
sense is `=>`, which is especially useful in default parameter lists:
```js
function tryCatchFinally(tryF, catchF = =>, finallyF = =>) {
// ...
}
```
________________________________
From: Axel Rauschmayer<mailto:[email protected]>
Sent: 7/28/2013 0:40
To: Brandon Benvie<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: More concise arrow functions
+1
My perspective: I don’t see a use case for a missing body, but a missing
parameter list would be very useful – to delay the execution of a block of
code. It also makes much sense visually:
2. (x, y) => { ... }
1. x => { ... }
0. => { ... }
On Jul 26, 2013, at 22:11 , Brandon Benvie
<[email protected]<mailto:[email protected]>> wrote:
On 7/26/2013 11:53 AM, Michael Haufe wrote:
A useless parameter is an option:
_=> 'foo'
This seems to be an argument in favor of making the params completely optional.
The fact that throwing in a useless param is more concise than having zero
params (due to paranthesis requirement).
I think the semicolon hazard is enough to make omitting the body questionable,
but omitting the params is an easy win with no downside.
_______________________________________________
es-discuss mailing list
[email protected]<mailto:[email protected]>
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
[email protected]<mailto:[email protected]>
home: rauschma.de<http://rauschma.de>
twitter: twitter.com/rauschma<http://twitter.com/rauschma>
blog: 2ality.com<http://2ality.com>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss