Minimalist Classes

Quildreen Motta quildreen at
Tue Nov 1 18:57:47 PDT 2011

On 01/11/11 22:18, Brendan Eich wrote:
> On Oct 31, 2011, at 6:57 PM, Jeremy Ashkenas wrote:
>> 'Evening, ES-Discuss.
>> After poking a stick in the bees' nest this morning (apologies, 
>> Allen), and in the spirit of loyal opposition, it's only fair that I 
>> throw my hat in the ring.
>> Here is a proposal for minimalist JavaScript classes that enable 
>> behavior that JavaScripters today desire (as evidenced by libraries 
>> and languages galore), without adding any new semantics beyond what 
>> already exists in ES3.
>> Let me know what you think, and feel free to fork.
> Thanks, I did fork, and I made a Rich Corinthian Leather version, for 
> the reasons given in the comments. In brief, I contend that 
> over-minimizing will please no one: class haters still gonna hate, 
> while class lovers used to batteries-and-leather-included will find 
> the bare sheet metal poky and painful.
> Love it or hate it, I'm ok either way :-P. But I do crave intelligent 
> responses.
> /be

I like how clean the syntax is there, Brendan. I still feel class syntax 
would have more value if they presented a nice way for object 
composition besides inheritance.

None the less, I think we could well get rid of those `var' inside the 
class-body, as long as it's not executable:

More information about the es-discuss mailing list