2 ms·
> That you're not writing in Java/Python/C#/Ruby should be pretty obvious. I don't think it's obvious at all that the keyword "class" is going to be fundamenta
by MatthewPhillips 15y ago
> That you're not writing in Java/Python/C#/Ruby should be pretty obvious.
I don't think it's obvious at all that the keyword "class" is going to be fundamentally different from whatever OO language you are coming from. Isn't this the single biggest reason why many developers have difficulty learning JavaScript?
> There will be near zero correlation between "class" and performance.
There already is performance differences between constructor functions and Object.create (in terms of initialization, that is).
- slightlyoff 15y agoObject.create() creates no closure. You've already paid for in the context in which you're .create()-ing. In any case, performance optimization is what happens when something becomes common enough to work its way into benchmarks. And calling out a delta now that's probably not your bottleneck seems...um...less than useful.