Finding a "safety syntax" for classes

Allen Wirfs-Brock allen at
Mon Mar 26 11:06:14 PDT 2012

On Mar 25, 2012, at 10:30 AM, Brendan Eich wrote:

> David Herman wrote:
>>     class Vector {
>>         /* various methods... */
>>         forEach = Array.prototype.forEach; // just an example, don't bikeshed me
>>         /* more methods ... */
>>     }
> Perhaps we are overreacting to the footgun of the proto-shared mutable object defined via a data property. Of course one can shoot at toes imperatively after the class declaration. And functions are mutable objects, so methods are a special case we bless even in the most minimal classes proposals!
> Still, I prefer to defer anything like the above (and of course, defer the better traits thinking you showed).

I'd say it is essential to progress that we defer such items.  Right now we need to focus on agreeing that  a maximally minimal class declaration that only includes methods is good enough for ES6.  Once we accomplish that, we can get back to future embellishments.  It is even possible that some embellishment might even be possible for ES6 but we can't get there if we don't first agree of maximally minimal part.


More information about the es-discuss mailing list