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

17

u/synackle Apr 01 '17

Damn, my heart stopped at global vars

2

u/nemaramen Apr 01 '17

That would break all the code.

1

u/synackle Apr 01 '17

Terrifyingly so!

0

u/blamo111 Apr 01 '17

I understood that to mean you can't reuse a variable name from a wider scope in a more local scope, which I thought was fair. You can come up with better names than that and remove ambiguity instead of shadowing.

My heart stopped at the 2nd one, keyboard shortcuts (c instead of const, f instead of function). Cause hipsters trying to Make FP Great have been promoting shorter but harder-to-read code for a while now, eg using arrow notation for no good reason. I thought "you finally really did it...you maniacs! Damn you!"

It took the 3rd one (dot notation everywhere) to allow me breathe a sigh of relief.