On Sep 28, 2011, at 11:07 AM, Bob Nystrom wrote: > On Tue, Sep 27, 2011 at 10:30 PM, Brendan Eich <[email protected]> wrote: > On Sep 27, 2011, at 4:06 PM, Waldemar Horwat wrote: > > > Trying to understand Oliver's objections to the current class proposal. > > Oliver objects, as do others, to "punning" (my word) declarative syntax to > define object properties, and mixing static and dynamic influences. He > specifically cited the location of public exportable-definitions in the > constructor body, instead of in the class body. > > We then discussed how putting public x,y; for a class Point in the class body > requires separate assignments in the constructor body. > > At some point, didn't we discuss borrowing a bit from CoffeeScript and > supporting this shorthand: > > class Point { > public x, y; > constructor(this.x, this.y) {} // <-- assigns args to instance fields > } > > If we were feeling crazy, we could go further (similar to Scala) and allow: > > class Point { > constructor(public x, public y) {} > } > > That gives you a declarative form, constructor argument, and initialization > all in one place.
+∞ When are your edits to the proposal appearing? :-| /be
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

