Function.prototype.bind

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Thu Sep 11 14:07:33 PDT 2008


Garrett Smith wrote:
> On Wed, Sep 10, 2008 at 6:33 PM, David-Sarah Hopwood
> <david.hopwood at industrial-designers.co.uk> wrote:
>> Garrett Smith wrote:
>>> Function.prototype.apply doesn't actually need any arguments.
>>
>> No, it always takes two arguments, which may be undefined. But since
>> an undefined argument can't be distinguished from a missing one,

I had forgotten arguments.length, but it doesn't matter.

>> that does mean it's not possible to condition on whether there are two
>> or three arguments. (Besides, I withdrew the suggested name 'apply3'.)
> 
> No, it doesn't always take two arguments. It takes whatever arguments
> I pass it. I just called it with 0 arguments and it took that.

Since I withdrew the suggested name 'apply3', how many arguments it
(or Function.prototype.apply) is considered to take is no longer
interesting or important. Presumably there is no dispute that the
static version's first argument is required, and that its second
and third arguments are optional.

-- 
David-Sarah Hopwood


More information about the Es-discuss mailing list