r/javascript • • Mar 31 '17

ES2018 First Look - it changes everything

https://www.youtube.com/watch?v=s-G_RZ4RJLU
464 Upvotes

120 comments sorted by

View all comments

Show parent comments

3

u/Daniel15 React FTW Apr 01 '17

Probably because other languages that have the same arrow function syntax (C#, Hack) don't have one. Yes yes, I know that CoffeeScript does.

That and the use cases are very narrow. There's not really a reason to complicate the syntax if it's not necessary. If you really want to maintain this, you can just use regular function syntax.

1

u/dupe123 Apr 01 '17

Honestly the main thing that annoys me about it is it makes the language totally inconsistent. If you want this binding you use () => but if you don't you use function()? Those are completely different. It makes me feel like I am using some patchwork language (which I am).

1

u/Daniel15 React FTW Apr 01 '17

If you want this binding you use () => but if you don't you use function()?

How often do you not want this binding though? I feel like that's very rare.