T
Thomas 'PointedEars' Lahn
Lasse said:Thomas 'PointedEars' Lahn said:So it could very well do things that are not observable by the caller.Lasse said:Garrett Smith wrote:
| The Function prototype object is itself a Function object (its
| [[Class]] is "Function") that, when invoked, accepts any arguments
| [[and
| returns undefined.
Again, that does _not_ say what can happen between the moment the
function is called and the moment it returns. So it does _not_ support
your assumption that the function would be a "no-op" either way.
Ofcourse it does. It says what the function does. Just like any other
function specified in the standard, it's not allowed to do observable
things that are not stated.
Well, duh. It can do anything that isn't observable - but how would
you know?
One could read the source code for some implementations. Otherwise, I do
not know. Neither does Garrett. That is why it is a fallacy (of his) to
assume the value of this property qualifies as a "no-op function" that is
"safe everywhere".
Are you not reading the specification such that a conformant
implementation may have a Function.prototype that does something
observable between entering the function and returning undefined?
Mu.
Otherwise what does "that does _not_ say what can happen between the
moment the function is called and the moment it returns" mean?
I say it does say.
Not sufficiently for this function to be assumed a "no-op".
I cannot see how the String function is *more* definitive than
Function.prototype.
It specifies how the return value is to be computed to begin with.
Then I fail to see what the issue is.
Maybe you can elaborate what your point is?
A "no-op" (no-operation, from the assembly language mnemonic) does nothing
at all.
PointedEars