On Tue, Jun 9, 2015 at 8:30 AM, Luke Scott <[email protected]> wrote:
[...]

> It currently uses `=` to define properties. And there is some debate
> whether or not properties should be initialized in the constructor or be on
> the prototype.
>


There is no debate about whether per-instance state (of whatever form) can
be initialized in the constructor. Often, this needs to be initialized to
some value dependent on the values of the constructor parameters. Given
that we have no choice about supporting initialization in constructors, the
debate is *only* about whether we should also bother to support
initialization in the class body outside the constructor. IMO, no. Why add
a redundant and less expressive mechanism?

As for properties on the prototype, these are rarely enough motivated that
doing it imperatively after class initialization seems fine. I don't recall
anyone strongly advocating that we need syntactic support for properties on
the prototype, though perhaps I missed it.


-- 
    Cheers,
    --MarkM
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to