Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upEditorial: contradiction re Function instances #876
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Apr 7, 2017
Contributor
This is complicated by the fact that the spec doesn't clearly say was it means by "X instance" where X is some constructor.
Indeed, what is a Function instance, to begin with? Following the definition, the issue may also stand for built-in functions, since they are not necessarily implemented as ECMAScript functions.
Indeed, what is a Function instance, to begin with? Following the definition, the issue may also stand for built-in functions, since they are not necessarily implemented as ECMAScript functions. |
jmdyck commentedApr 7, 2017
Function Instances says:
But Function.prototype.bind creates bound function exotic objects, which are not ECMAScript function objects, so there is a contradiction.
(In passing, "function instance" in the first sentence should presumably be "Function instance".)
Here are a couple possibilities (there may be others):
This is complicated by the fact that the spec doesn't clearly say was it means by "X instance" where X is some constructor. I'm guessing it means 'instance' in more or less the sense of the 'instanceof' operator. But I'm still not sure how to resolve the contradiction.