royale-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <>
Subject Re: Static inheritance
Date Mon, 23 Apr 2018 17:35:03 GMT

I'm interested in know what static inheritance will give us. I search a
bit, but couldn't see links that give some points about what this feature
will give us.


2018-04-23 19:25 GMT+02:00 Alex Harui <>:

> Harbs,
> Can you provide a link to more info on how 'this' works in statics?  MDN
> makes it sound like it points to the global object even in ES6.
> I saw an article that code duplication isn't a perfect emulation of ES6
> statics in ES5.
> inherited-when-using-es6-extends-syntax-in-javascript-and-node-js.htm
> On 4/22/18, 11:46 PM, "Harbs" <> wrote:
>     It seems like ES6 supports static inheritance. The means you can
> define a class with static methods which can be called in subclasses. You
> can also use “this” in static methods which will refer to the subclass
> methods if overridden. This is obviously something which doesn’t work in
> AS3.
>      I’m porting an ES6 library to AS3 and I’m trying to figure out the
> best way to port this kind of code. I’m thinking that code duplication is
> probably simplest, although I might just convert the static classes into
> singletons.
>     Harbs

Carlos Rovira

View raw message