Classes: suggestions for improvement

Brendan Eich brendan at mozilla.com
Mon Jun 13 12:31:30 PDT 2011


On Jun 13, 2011, at 12:26 PM, Brendan Eich wrote:

> +1. Very nicely put.
> 
> /be

One more thought:


>> </philosophical>
>> 
>> In part I think class is the wrong word, as cowboyd tweeted (see below).
>> 
>> Agreed. "class" isn't ideal, but it's probably the best we have. It carries a lot of baggage, some of which is helpful and some of which isn't. I think most of the pragmatic baggage is helpful (things you make with this class proposal behave pretty similarly to classes in other languages) 

The language to emulate is Smalltalk, though. People may not often think "classes in JS are like classes in Smalltalk", I'm afraid. It may be that they're more likely to think of Java.

Ruby as a Smalltalk heir may be worth studying. The inherited class methods idea is common to Smalltalk and Ruby. I do not think we should argue from Java on this point, or others. But however we argue, it may not matter. Classes in JS will probably remind a fair number of people of Java, and that (along with JS's marketing-scam of a name :-P) is unfortunate.

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110613/da8a7803/attachment.html>


More information about the es-discuss mailing list