3 ms·
I hoped decorators[1] would make it, but seems unlikely (looks like they're still at stage 2). [1] https://github.com/tc39/proposal-unified-class-features http
by sandstrom 9y ago
I hoped decorators[1] would make it, but seems unlikely (looks like they're still at stage 2).
[1] https://github.com/tc39/proposal-unified-class-features https://github.com/tc39/proposal-unified-class-features
- bterlson 9y agoProbably not ES2018, but 2019 is looking likelier now thanks in part to excellent work by Daniel Ehrenberg (@littledan).
- javajosh 9y agoHaving spent a long time with Java I believe I understand the limits of this style of coding; in my considered opinion, composition is almost always better than inheritance. This is true regardless of the type of inheritance, be it prototypal or class-based (in appearance or reality). Therefore, adding features to JS to make class-like inheritance slightly better is not a trade-off I would make, favoring a simpler language over a feature who's use shouldn't be encouraged.
- always_good 9y agoThey're talking about this section in particular: https://github.com/tc39/proposal-unified-class-features#decorators https://github.com/tc39/proposal-unified-class-features#deco... Where decorators are sugar for higher order functions, even capable of `Class -> Class` transformation, which makes them much different from Java annotations.