Minimalist Classes

Erik Corry erik.corry at gmail.com
Wed Nov 2 10:42:48 PDT 2011


2011/11/2 Quildreen Motta <quildreen at gmail.com>:
>> I don't think hard coding the name of the super-constructor is a
>> problem.
>
> It is when you take into account that functions in JavaScript are not bound
> to an object, they are generic. You can simply assign any function to any
> object and it'll most likely just work.

I think the chances are slim that you can take a function that does a
super call, put it on a different object, and it will 'just work'.
It's a pretty rare case.

<troll> C++ requires you to state the name of the super-class in super
calls, and Java doesn't.  Do we want to be like Java? </troll>

-- 
Erik Corry


More information about the es-discuss mailing list