as defined here:
Module.init is implemented like:
Module.init = Controller.init = Model.init = (a1, a2, a3, a4, a5) ->
new this(a1, a2, a3, a4, a5)
why is it like this? why define 5 attributes and not use attrs...
so attributes are not fixed to 5....
new this(attrs...)
Maybe it's because the compiled JS is much smaller (Spine.js makes a lot of emphasis on low footprint).
Compiles to:
While:
Compiles to the much more convoluted:
This is because in JavaScript the
new
operator andapply
cannot be used in conjunction :(