4 ms·
I remember that when classes were proposed (in the defunct ES4 and again for ES6) much of the opposition was of this changing the semantics of ES from using pro
by grabcocque 10y ago
I remember that when classes were proposed (in the defunct ES4 and again for ES6) much of the opposition was of this changing the semantics of ES from using prototype chains to classical inheritance, which was viewed as a step backwards.
On the contrary though, since classes are carefully designed to be just syntactic sugar around prototypes, it should be easy to migrate, right?
Well no, because the one thing that became obvious was that, since there were no standards, and no clearly and obviously idiomatic way to do prototype chains, nobody was doing them in a correct, consistent way.
So trying auto-migrate is almost certainly doomed except in trivial cases, because as the article implies there's a high chance of it just being flat wrong anyway.