2: We didn't think we could deliver a good experience for Ember devs without class fields and decorators,
-
-
And again, I'm really just talking about how the communities reacted. Ember community took heat for hanging back but I think it was right.
-
How have class fields changed in their path to stage 3?
-
Some obvious ones: - they defineProperty instead of set (matters for setters on the proto) - x; produces undefined vs. a hole
-
both of these can easily affect what happens when you subclass an object in pretty common ways.
-
So if I do this.x=2 in base ctor, & extend, & in sub class do a x = 3 field, latter will defineProperty on proto & be shadowed by base x?
-
Fields are never on the proto. The issue is class X { set x() {} } class Y extends X { x = 1; } ^ doesn't run X's setter in Stage 3.
-
Ahhhhh - seems like a bug in the earlier proposal. Glad it was fixed.
-
Honestly seems pretty esoteric—unlikely to matter usually. Given react's JS-first, class fields were pretty necessary over manual binding
- 5 more replies
New conversation -
-
-
re. 1, I guess I just misunderstood what you meant by Ember not supporting them.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.