-
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
Editorial: standardizing preambles for concrete methods and internal methods #1981
Comments
I prefer it in the preamble, with wording like
|
One thing about that wording is that it doesn't parallel the standard wording for abstract operations, i.e.:
so it's unclear what the ellipsis represents. E.g., were you thinking this?:
If so, we could eliminate the repeated "when [it is] called" and move closer to the standard form for abstract operations with something like:
|
Indeed, I was thinking of that kind of wording, but I am okay with either of the two options you listed. I guess the latter is a little nice because it's more similar to the AO preamble wording. |
Editor group talked about it and is in favor of this form. (Except I'm not entirely sure what "target-alias" would look like here; can you give a concrete example?) |
@bakkot It's When the [[DefineOwnProperty]] internal method of an Array exotic object _A_ is called ... |
So, concretely,
|
... rather than the algorithm, for internal methods of an arguments exotic object. (See issue tc39#1981)
... into the format set out in issue tc39#1981.
... according to the format of issue tc39#1981. (And introduce preambles where before there was none.)
... according to the format of issue tc39#1981.
... into the format set out in issue tc39#1981.
... according to the format of issue tc39#1981. (And introduce preambles where before there was none.)
... according to the format of issue tc39#1981. (In the process, drop occurrences of "implements the corresponding Module Record abstract method" from the current preambles: it doesn't add anything.)
... according to the format of issue tc39#1981. (And introduce preambles where before there was none.)
... according to the format of issue tc39#1981. (In the process, drop occurrences of "implements the corresponding Module Record abstract method" from the current preambles: it doesn't add anything.)
... rather than the algorithm, for internal methods of an arguments exotic object. (See issue tc39#1981)
... into the format set out in issue tc39#1981.
... according to the format of issue tc39#1981. (And introduce preambles where before there was none.)
... according to the format of issue tc39#1981. (In the process, drop occurrences of "implements the corresponding Module Record abstract method" from the current preambles: it doesn't add anything.)
... rather than the algorithm, for internal methods of an arguments exotic object. (See issue tc39#1981)
... into the format set out in issue tc39#1981.
... according to the format of issue tc39#1981. (And introduce preambles where before there was none.)
... according to the format of issue tc39#1981. (In the process, drop occurrences of "implements the corresponding Module Record abstract method" from the current preambles: it doesn't add anything.)
Reword preambles for internal methods into the format set out in issue tc39#1981. - Declare the target-alias in the preamble rather than the algorithm, for internal methods of an arguments exotic object. - Drop the target-alias from the preamble when the algorithm doesn't reference it. - Fill in some missing parameter-types. Also, delete "(which|that) was created using the bind function" from the [[Call]] and [[Construct]] preambles for bound functions. The wording suggested that there could be bound functions that *weren't* created using the 'bind' function, and that these things would have their own [[Call]] and [[Construct]] methods.
Reword existing preambles and fill in missing ones according to the format set out in issue tc39#1981. ---- HasThisBinding() + HasSuperBinding(): - When the algorithm is simply returning a specific Boolean value, create a Note after the algorithm re providing (or not) the binding (moving the sentence from preamble if applicable). - Reword re use of the word "regular" (avoid it or explain it). ---- Present never-invoked concrete methods more consistently. Specifically, present DeleteBinding for module ER more like CreateImmutableBinding for object ER. - Don't say it "refuses to delete bindings", because that sounds like it throws an error if invoked, when in fact it's never invoked. - Drop the emu-alg that just asserts it's never invoked.
Reword preambles according to the format set out in issue tc39#1981. (In the process, drop occurrences of "implements the corresponding Module Record abstract method" from the former preambles: it doesn't add anything.)
Reword preambles for internal methods into the format set out in issue tc39#1981. - Declare the target-alias in the preamble rather than the algorithm, for internal methods of an arguments exotic object. - Drop the target-alias from the preamble when the algorithm doesn't reference it. - Fill in some missing parameter-types. Also, delete "(which|that) was created using the bind function" from the [[Call]] and [[Construct]] preambles for bound functions. The wording suggested that there could be bound functions that *weren't* created using the 'bind' function, and that these things would have their own [[Call]] and [[Construct]] methods.
…ods (tc39#1994) Reword existing preambles and fill in missing ones according to the format set out in issue tc39#1981. ---- HasThisBinding() + HasSuperBinding(): - When the algorithm is simply returning a specific Boolean value, create a Note after the algorithm re providing (or not) the binding (moving the sentence from preamble if applicable). - Reword re use of the word "regular" (avoid it or explain it). ---- Present never-invoked concrete methods more consistently. Specifically, present DeleteBinding for module ER more like CreateImmutableBinding for object ER. - Don't say it "refuses to delete bindings", because that sounds like it throws an error if invoked, when in fact it's never invoked. - Drop the emu-alg that just asserts it's never invoked.
As a follow-up to PR #1914 etc, I'm thinking about standardizing the preambles for concrete methods and internal methods, and I'm looking for some editorial direction.
Concrete methods and internal methods are similar in that the method's target is not named in the method's parameter list, so must be named elsewhere.
For concrete methods, the target-alias is always declared in an algorithm step (typically the algorithm's first), e.g.:
or
For internal methods, it's usually done in the preamble, e.g.
or
but there are also a few cases where it's done in an algorithm step, e.g.:
Given that, I wonder if you have any preferences for:
The text was updated successfully, but these errors were encountered: