On Oct 3, 2011, at 4:19 AM, Axel Rauschmayer wrote:
>
> Addendum: With the definition of the new operator as below (for non-function
> operands, if the operand is a function, things stay the same), do you think a
> reference from Person.constructor.prototype to Person is still necessary?
>
>> operator new(proto, ...args) {
>> let o = Object.create(proto);
>> o.constructor(…args);
>> return o;
>> }
I think it is if you want:
Let Employee = Person.constructor <| function () {} ... class pattern
to wire-up as:
Object.getPrototypeOf(Employee) === Person.constructor
and
Object.getPrototypeOf(Employee.prototype) === Person
In other words, it provides a way to contect prototypal inheritance based
abstractions with classical inheritance based abstractions
Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss