Comment on Improving EcmaScript5 OO with sugarComments−mrspeaker14yI hope ES.next gets a bunch of the goodness that is outlined in Harmony - this would mostly eradicate the need for stop-gap libraries like pd, or transpilers like CoffeeScript. http://wiki.ecmascript.org/doku.php?id=harmony:object_litera...And being able to do var obj = protoObj <| { ... properties ... } would be fantastic. If I that, and short function syntax then I'd be happy.−RaynosOP14yYou need all three I'm afraid.We need an easy way to mixin/extend objects. var obj = protoObj <| mixin({ ... properties ... }, mixinA); We also need a solid way to create instances. object.create(obj); obj.constructor(); is just too verbose. There is some talk around making `new` work with object exemplars which would be great.
Comments
I hope ES.next gets a bunch of the goodness that is outlined in Harmony - this would mostly eradicate the need for stop-gap libraries like pd, or transpilers like CoffeeScript. http://wiki.ecmascript.org/doku.php?id=harmony:object_litera...
And being able to do
would be fantastic. If I that, and short function syntax then I'd be happy.You need all three I'm afraid.
We need an easy way to mixin/extend objects.
We also need a solid way to create instances. is just too verbose. There is some talk around making `new` work with object exemplars which would be great.