On Sep 30, 2011, at 2:25 AM, Oliver Hunt wrote: > On Sep 29, 2011, at 6:20 PM, Brendan Eich wrote: > >> On Sep 30, 2011, at 1:11 AM, Erik Arvidsson wrote: >> >>> On Thu, Sep 29, 2011 at 17:08, Bob Nystrom <rnyst...@google.com> wrote: >>>> class Monster { >>>> constructor(this.name, this.health) {} >> >> I <3 this. It beats the (public name, public health) variant in my view by >> being explicit and not dragging in p-words. > > I dislike it as it conflates assignment with declaration.
I don't see assignment at all. If you mean actual parameters bind to formal parameters as if by assignment, sure -- but nothing in the existing function head syntax conflates or abuses the = operator. I do not believe there is any declaration here. This is simply sugar for constructor(name, health) { this.name = name; this.health = health; } /be
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss