On Nov 14, 2011, at 4:05 PM, Jake Verbaten <[email protected]> wrote:
> When you create a function, it has an automatically created prototype object
> who has a constructor property defaulted to the original function.
Note that this unobservable mutation occurs before the function object is
available to script.
> Why would it be bad to augment the UnaryExpression after the class keyword so
> that it has an empty constructor if it doesn't exist?
Because UnaryExpression may evaluate to a reference to an existing object, in
which the mutation of 'constructor' from not-own to defined is observable,
Mutation of operator operands apart from ++, +=, 'delete' and the like is a bad
idea. Some object to .{ on this basis. 'class' unary prefix would be even more
unusual.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss