class sugar: static inheritance

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Jun 6 11:08:47 PDT 2011


On Jun 6, 2011, at 10:32 AM, Brendan Eich wrote:

> On Jun 6, 2011, at 10:19 AM, Bob Nystrom wrote:
> 
>> On Sun, Jun 5, 2011 at 9:35 PM, Peter Michaux <petermichaux at gmail.com> wrote:
>> Based on my understanding of what the desugared code would be, the
>> last line above would be an error because Dragon.allMonsters is
>> undefined.
>> 
>> That's correct. Do you have any examples of code where inheriting the constructor objects would be helpful?
> 
> Used all the time in Ruby, and in some Smalltalks. Supported by CoffeeScript. See

Actually, all modern Smalltalks where modern means anything post 1980




> 
> https://gist.github.com/1007150
> https://gist.github.com/1006999
> 
> (warning: Ruby reading skills required).
> 
> /be
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



More information about the es-discuss mailing list