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

Re: [WebIDL] Handling undefined in Overload Resolution Algorithm

From: Brendan Eich <brendan@meer.net>
Date: Fri, 5 Aug 2011 18:27:20 -0700
Message-Id: <14F9A4A3-796A-4EC3-AFFF-CDFD3B7B5029@meer.net>
Cc: Brendan Eich <brendan@mozilla.org>, Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
To: Jonas Sicking <jonas@sicking.cc>
On Aug 4, 2011, at 4:40 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> The question comes down to this: Is it more "javascripty" to look at
> the actual argument count (in JS terms, check arguments.length), or is
> it more "javascripty" to look at which arguments have the value
> <undefined>.

It depends. It is *not* "JavaScripty" to pass "undefined" (the string) to a function expecting a string actual that has optional parameters including the one for which no actual undefined was passed but a default value of undefined was passed.

Received on Saturday, 6 August 2011 01:27:48 UTC

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