Just as curiosity, and I may probably simply read the draft about it, in JS
today we borrow methods no matter which prototype they are related ... eg
myobj.push = [].push
I wonder if this super() works as parent or if it works as "static", as
example, in PHP 5+ world where
static::method()
would refer to the current instance parent/super class rather than the one
referenced when this method has been created.
As summary, I would like to know if a mixin could be defined in this way:
var object = {
genericMethod: function (...args) {
super(...args);
}
};
SomeSubClass.prototype.genericMethod = genericMethod;
Thanks for any sort of clarification.
Best Regards,
Andrea Giammarchi
On Sat, Oct 29, 2011 at 5:45 AM, Brendan Eich <[email protected]> wrote:
> On Oct 28, 2011, at 8:23 PM, Axel Rauschmayer wrote:
>
> > The ES.next version is quite nice:
>
> [Snip]
>
> I have to say Allen's use of chained <| and .{ wins if you are going for a
> "class pattern".
>
> There are lots of patterns. It still seems to me we would help more users
> avoid mistakes by having real class syntax. More on that in a bit.
>
> /be
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss