ES Arrow functions are unhelpfully distinctive. No `arguments`. Implicit return unless you use `{}`. No `()` in param list unless zero-param
-
-
Replying to @searls
arguments come from outside, like this, super and other keywords: class { push(array) { array.forEach(i => super.push(i); } }
1 reply 0 retweets 1 like -
Params list always requires () except for single arg case, which is linked with the arrow expressions: let a2 = a.map(i => i + 1)
1 reply 0 retweets 0 likes -
TLDR the shortest syntax is designed for functions that take functions and do transformations like map, filter, etc
2 replies 0 retweets 3 likes -
What ever happened to the proposal for long returns in JS?
2 replies 0 retweets 0 likes -
I lost that one before I even joined the committee. Still working on Rust though ;)
1 reply 0 retweets 1 like -
been thinking about it lately. Is it still just ruby and smalltalk that do it?
1 reply 0 retweets 0 likes -
I will be sad if I can't get it into Rust. It'll require a bit of new syntax and opt-in, but worth it.
2 replies 0 retweets 1 like -
Is it going to be special syntax in Rust then?
1 reply 0 retweets 0 likes
I think @aaron_turon thinks it might fall out of the distinction between `||` and `move ||` -- either way I want it
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.