Proposal for a static constructor and static member variables
dabas at untu.ms
Thu Jan 26 06:51:31 UTC 2017
Having a static constructor makes things more confusing, since now static
and instance constructors would need to be differentiated, and its value is
kind of unclear. Your example also doesn't make sense, since you're
accessing the static properties from the instance constructor using `this`,
which would refer to the instance, not the constructor.
On Thu, Jan 26, 2017 at 6:40 AM, Brandon Andrews <
warcraftthreeft at sbcglobal.net> wrote:
> The initial proposal for discussion is below:
> I don't believe this conflicts with other proposals yet, nor any future
> proposals. Essentially it adds static members in a very compact syntax with
> minimal grammar changes required.
> What I foresee happening years from now is public, private, and static
> member syntax will be added. Much like how public members are defined in
> the constructor for the moment the static constructor would be the way to
> define static members of the class for now.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss