I noted some open issues on "Classes with Trait Composition"

Brendan Eich brendan at mozilla.com
Thu May 19 17:22:08 PDT 2011


On May 19, 2011, at 5:03 PM, Bob Nystrom wrote:

> On Thu, May 19, 2011 at 3:08 PM, Brendan Eich <brendan at mozilla.com> wrote:
> class Point {
>   x = 0;
>   ...
> }
> 
> is a bit of a mystery.
> 
> Is it an assignment expression-statement? No, no statements as ClassElements.
> 
> Could it be creating a prototype property, as other unprefixed property initialisers such as get and set accessor declarations, and property initialiser extensions declaring prototype methods, do? Yes, that's the intent.
> 
> But, I object (mildly), it does not look like a property initialiser. It looks like an assignment expression-statement.
> 
> Agreed, completely. My first stab at this used var for declaring fields:
> 
> class Point {
>   var x = 0; // x field on prototype
> }

Yes, I see your point now. Probably we should jump to thread off of my reply to Mark.

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110519/9d4f7ff1/attachment-0001.html>


More information about the es-discuss mailing list