Fork of classes proposal, @ for private members, class as operator

Herby Vojčík herby at mailbox.sk
Sat Jan 21 08:37:53 PST 2012


I forked the classes proposal and made changes I would really like to 
see there. The proposal is here:

   http://dw.herby.sk/doku.php?id=es.next:classes.herby

and the diffs (side-by-side and inline) to the actual proposal are here:

 
http://dw.herby.sk/doku.php?id=es.next:classes.herby&rev=1327097746&do=diff&difftype=sidebyside
 
http://dw.herby.sk/doku.php?id=es.next:classes.herby&rev=1327097746&do=diff&difftype=inline

Main changes:
   - private(expr) not used, foo. at bar private-name syntax instead
   - private keyword as a shortcut to declare private names
   - class is an operator on full-fledged object literal
   - <| used for inheritance
   - parallel prototype->prototype and constructor->constructor chains
   - shorter (class body definition and private(foo) section removed)

Herby


More information about the es-discuss mailing list