|
|
|
|
|
by flippyhead
5539 days ago
|
|
I'm curious how you respond to the differences in the Spine inheritance model and the argument they make for it: "Spine's class implementation is one of its features that makes it stand out from the crowd. Rather than copying properties to emulate inheritance, as most libraries, Spine uses JavaScript's native prototypal inheritance. This is how inheritance should be done, and means it's dynamic, properties are resolved at runtime." |
|
In fact, Spine doesn't use "JavaScript's native prototypal inheritance", which, if we're being honest, is the use of constructor functions with prototype properties. It uses an emulated version of Object.create:
https://github.com/maccman/spine/blob/master/spine.js#L79-11...
... which, even when natively implemented, is quite a bit slower than the real thing:
http://jsperf.com/new-vs-object-create