minimal classes

Allen Wirfs-Brock allen at
Tue Jun 28 02:52:40 PDT 2011


I agree with your goal of simplifying things in this area.  In that regard, I think you bare-miniumn requirements align quite nicely with "prototypes as classes" as has been recently discussed here.  In case you haven't followed all the twists of the discussion, Axel Rauschmayer has a nice overview at . The big hangup with this approach until recently was that it did not seem to  fit well with the existing built-ins or constructor patterns.  However, it now appears that there is a pretty nice way to integrate the two approaches.

Taking this approach, we would have the full expressiveness of your bare-miniumn classes but achieve it using object literal extensions.   There is no need to add a new class declaration form. We would have something that works and feels like classes but which also preserves the prototypal inheritance focus and feel of ES.  It also continues to reserve the "class" keyword for future use, if it turns out that this simpler "prototype as classes" approach is inadequate (I don't think this will happen, but it is good to still have a fallback).

As soon as a get a block of time later this week I will write up a "prototype as classes" proposal that covers al the technical edge cases including integration with existing built-ins.


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

More information about the es-discuss mailing list