Finding a "safety syntax" for classes

Kevin Smith khs4473 at
Wed Mar 21 06:35:22 PDT 2012

Hi Axel,

We should probably hold off on private and static member syntax until
there's consensus on the other open issues:

- "constructor" vs. "new" (Dave and I say "new", Allen says "constructor";
 mostly aesthetic - can be put off for now)
- class-side inheritance?  (Mark and I say no, Allen and Russell say yes)
- What restrictions for RHS of "extends"?  Must it be a constructor?
 (Russell and I say yes)

Additionally, I'm still worried about how we call the superclass

    new() {
        // do arbitrary stuff here

This would potentially allow a superclass instance method to be called
before the superclass initialization has completed.  If we want to maintain
the invariant (as it seems most class-based languages do) that methods can
only be called after initialization has completed, then this won't work.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list