W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: Non-constructible constructors and Arrays

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 01 Aug 2011 12:09:02 +1200
Message-ID: <4E35EE9E.9000600@mcc.id.au>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: David Flanagan <dflanagan@mozilla.com>, Alex Russell <slightlyoff@google.com>, public-script-coord@w3.org, Brendan Eich <brendan@mozilla.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:04 UTC