Closed ghost closed 3 years ago
You already can’t, because of .bind().
You already can’t, because of .bind().
Oh, right, I use .bind
too often to have forgotten about it.
But still, providing a solution to the problem wouldn't be bad, would it?
I suspect some would consider it bad, which is likely why the committee decided against a different string in the square brackets than “native code” - iow, it was intentional that hidden-implementation functions and bound functions and native functions be indistinguishable.
From the current README:
This proposal fixes one problem, but causes another: we can no longer determine whether or not the function is built-in or not.
How about, instead of preventing this, providing a "proper" way to do this, that the community would encourage over the hacky
Function#toString
solution?Something along the lines of:
Although, this could be considered to be counter-intuitive to some of the goals that this proposal attempts to fix.