3 ms·
> Since Spine doesn't use constructor functions, due to limitations with prototypal inheritance, classes are instantiated with inst(). Can someone explain this
by munificent 16y ago
> Since Spine doesn't use constructor functions, due to limitations with prototypal inheritance, classes are instantiated with inst().
Can someone explain this to me? I've been using prototypal inheritance through Closure's goog.inherits() and never had any problem using regular object constructors.
- firefoxman1 16y agoMaybe it's referring specifically to the "new" keyword that can cause issues if left out when creating instances. If you look at the code, Spine uses Object.create(this.prototype) for init. This article is a great explanation on issues with prototypal inheritance http://howtonode.org/prototypical-inheritance http://howtonode.org/prototypical-inheritance