Hi,

I think there lot's of proposals for ES.next that require syntax extensions, 
which is probably worth if new functionality added or shortens most commonly 
used constructs like functions (were no other option is available). In case of 
this proposal: 
http://wiki.ecmascript.org/doku.php?id=strawman:classes_with_trait_composition#open_issues
 even though
I like it I'm not sure adding new syntax is worth it.

I'm not suggesting that sugar for class composition is not necessary, example 
from three.js used by proposal highlights necessity pretty very well, I'm just 
thinking of doing that without introducing new syntax, here is one option: 
https://gist.github.com/986487

This way syntax noise may be reduced in addition this can be shimmed into 
current JS by implementing `Function.prototype.extend`.

Also every single frameworks today does something similar in one form or 
another, IMO all is necessary is to have a standard that will let bikeshedding 
go away. I think there is also a good precedent of this with 
`Function.prototype.bind`.

Here are some related links:

http://documentcloud.github.com/backbone/
http://base2.googlecode.com/svn/version/1.0.2/doc/base2.html#/doc/!base2.Base
http://prototypejs.org/learn/class-inheritance
http://startdojo.com/2011/03/02/dojo-classes-inherited-and-constructors/
http://mootools.net/docs/core/Class/Class
http://ejohn.org/blog/simple-javascript-inheritance/


Kind regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/
Address: 29 Rue Saint-Georges, 75009 Paris, France

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to