Draft of Function.prototype.bind.
mjs at apple.com
Mon Nov 3 20:16:06 PST 2008
On Nov 3, 2008, at 8:01 PM, David-Sarah Hopwood wrote:
> Brendan Eich wrote:
>> On Nov 3, 2008, at 6:50 PM, David-Sarah Hopwood wrote:
>>> That is, native objects that implement [[Call]] must be functions.
>> No, see 16, second list, second bullet:
>> "An implementation may provide additional types, values, objects,
>> properties, and functions beyond those described in this
>> This may cause constructs (such as looking up a variable in the
>> scope) to have implementation-defined behaviour instead of throwing
>> error (such as ReferenceError)."
> So what does "Objects that implement this internal method are called
> functions." in the description of [[Call]] mean, then? If it is not
> true for native objects (which is what the section claims to be
> then it is simply incorrect.
It's saying you can call anything that's callable a function, or
perhaps even loosely defining a term "function".
But this does not guarantee that typeof returns "function", that the
internal [[Class]] property has the value "Function", or that
Function.prototype is in the prototype chain, among other potentially
The rest of the spec doesn't usually refer to the property of being a
function without further explanation, since it is unclear which of
these things are intended.
More information about the Es-discuss