4 ms·
Probably the single biggest practical thing it did was fix `this` via `=>` when using jQuery or jQuery-based frameworks like Backbone.js. This didn't feel like
by barrkel 6y ago
Probably the single biggest practical thing it did was fix `this` via `=>` when using jQuery or jQuery-based frameworks like Backbone.js. This didn't feel like the future so much as a fix for a giant painful wart in JS.
The second nicest thing about it was the way it eliminated a lot of ceremonial redundancy around code, parentheses in particular. Just like Ruby, it's not actually a great idea to leave those out due to ambiguities, but when you want a micro-DSL to encode some pattern, it really helps reduce the syntactic noise.
Third thing was being opinionated about how you structure classes and objects. This, again, didn't feel like the future; it felt like papering over a big gap in JS.
- karatestomp 6y agoYeah, just getting rid of the "interesting I guess but I'd never use them on purpose because they're just not helpful and likely to cause confusion or bugs" parts of JS, like direct fiddling with prototypally-inheriting objects (ew), worrying a bunch about what "this" means and shuffling it around for little to no useful reason, or entirely-unhelpful scoping rules. Most of those are better in regular JS now. For me, the syntax was at best neutral, leaning toward undesirable. I just wanted the extra ergonomics and safety, which didn't require such a departure from JS.