> > class-specific constants such as Point.ZERO.
> 
> Why can't this be on the prototype? Why do we even pass the constructor 
> function around as an object?
> 
> I agree we need a better way of writing this, I think the flaw lies in 
> passing constructor functions around everywhere.

You are preaching to the choir. :-)

Alas, there is no consensus that prototypes are the better exemplar (class, 
object factory, ...). Some people prefer constructors. Constructor exemplars do 
have the advantage of being more compatible with existing code. If constructors 
are here to stay, we need to find a syntax that makes it easy to create them. 
Class literals and the various class definition patterns are all suitable 
candidates.

-- 
Dr. Axel Rauschmayer
[email protected]

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com



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

Reply via email to