-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does the text in the note in 14.9.1 refer to 9.2.4? #1848
Comments
https://tc39.es/ecma262/#sec-addrestrictedfunctionproperties describes a function's caller and arguments properties, which are indeed common non-standard language extensions; additionaly, if you look at the 2015 snapshot you'll see that it links to 9.2.7, which is the same section that 9.2.4 now refers to. |
@ljharb wait a minute but they (property names: |
The spec has them as restricted; i believe prior to having that, the properties may have been nonstandard (as in, not in the spec, and only supplied by browsers) |
The problem is that there is no good place to link, because the spec currently avoids to name explicitly the incriminated well-known “non-standard language extension” like dirty words. Hopefully, the issue will be resolved the same day as #562. |
probably you wanted to write restriction instead of restricted? Because it makes a lot of sense. In other words, the @claudepache hmm, and that sounds pretty convincing. Although it’s strange for me personally, you can somehow formulate it so that it doesn’t sound like dirty words. And then this is a browser issue, not a specification. They continue to use from year to year that which has never been officially specified in the specification (excluding restrictions imposed by the specification). In any case, if my issue is solved on the same day as yours, this will be wonderful. |
@dSalieri no, i meant to write "restricted", the adjective form; "restriction" is the noun form. The spec has them as restricted; the spec also has them as restrictions - both phrases are correct and mean effectively the same thing. |
@ljharb in my language, this makes a big difference to the meaning. But I understand you. By the way, you didn’t react at all to the second paragraph. I would like to see your comment on this. |
If the properties exist and accessing them doesn't throw, they're non-standard. That non-standard extension is the reason the restrictions were added in the first place. |
@ljharb yeah understood, then 9.2.4 is a restrictions for properties "caller" and "arguments". Right? |
Yes, that’s my understanding. |
@ljharb thank you for your responses |
In
14.9.1 Static Semantics: IsInTailPosition (call)
there is a note that says:Why does the note refer to 9.2.4 (in 9.2.4 a common non-standard language extension is not described)? 9.2.4 describes an abstract operation that creates 2 properties for
Function.prototype
of an object which, when called, should throw an error. Thereby preventing observation of the chain of caller contexts.In more detail: I wanted to say that the reference to 9.2.4 somehow seems to be out of place in the note (by my opinion). If you do not follow this link (9.2.4), you might think that it describes a common non-standard language extension, its rules or something like that - but it is not. Is it possible to paraphrase this note somehow?
How can you comment on this situation?
The text was updated successfully, but these errors were encountered: