Is class syntax really necessary ?

Irakli Gozalishvili rfobic at
Mon May 23 03:17:45 PDT 2011


I think there lot's of proposals for 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: 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:

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:!base2.Base

Kind regards
Irakli Gozalishvili
Address: 29 Rue Saint-Georges, 75009 Paris, France

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list