Re: Non-constructible constructors and Arrays

On 1/08/11 12:04 PM, Garrett Smith wrote:
> But for constructors that are specified, what happens when an argument
> is missing should be defined, even if to say throw a DOMException
> TYPE_MISMATCH_ERR (or possibly TypeError if that is not too radical an
> idea). That at least avoids the opportunity for interpreting whether
> or not `undefined` should be "" or "undefined", an error, etc.
>
> For API consistency, EcmaScript internal operations should be used for
> type conversion, i.e. ToBoolean, ToString, etc. See also:
> http://es5.github.com/#x9

Indeed, and that should already be the case, as arguments in constructor 
invocations are treated/converted just as those in operation invocation are.

Received on Monday, 1 August 2011 00:09:49 UTC