3 ms·
I also agree with what you are saying. JS in terms of usage is so big that I guess developers behind JS compilers will have to optimize for "the most popular wa
by drinchev 12y ago
I also agree with what you are saying. JS in terms of usage is so big that I guess developers behind JS compilers will have to optimize for "the most popular way of solving that problem".
In any case, why I mentioned preprocessors is that there is a lot of history behind every feature. As of this there are a couple of github issues [1] that explain why this approach has been used.
For the performance. Seems that "new" is way faster. [2]
[1] : https://github.com/jashkenas/coffeescript/issues/912 https://github.com/jashkenas/coffeescript/issues/912
[2] : https://jsperf.com/obj-create-vs-new/4 https://jsperf.com/obj-create-vs-new/4
- deleted 12y ago[deleted]