Skip to content
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: Consistify summaries for instrinsic functions #3315

Open
jmdyck opened this issue Apr 20, 2024 · 0 comments
Open

Editorial: Consistify summaries for instrinsic functions #3315

jmdyck opened this issue Apr 20, 2024 · 0 comments

Comments

@jmdyck
Copy link
Collaborator

jmdyck commented Apr 20, 2024

(This recent comment from @michaelficarra reminded me of this old comment from me. It didn't get any discussion at the time (it wasn't crucial to the PR), so I'm raising it again in a dedicated issue.)


There's an inconsistency in the prose for intrinsic functions that might have been within the scope of PR #2592, but I didn't do anything about it there because I wasn't sure how to resolve it. When a function definition includes a prose summary, it's sometimes a <p>, and sometimes an <emu-note>. The ones that are Notes are mainly in String.prototype.* and Array.prototype.*.

For example,

It looks like the summaries-as-Notes arose in ES6. The old ecmascript.org wiki says:

We generally within the specification try to minimize tutorial material (eg examples) and redundancy between normative prose descriptions and normative algorithms. Redundant descriptions has historically resulted in internal inconsistencies. We have also seen cases where implementors follow incomplete prose descriptions without referring to the more complete algorithm. For these reasons, much of the redundant prose from previous editions is being converted into non-normative notes.

My guess is that this was written by @allenwb, and refers to the summaries-as-notes we see in String.p.* and Array.p.*.


Here are some possible actions:

  • Leave it as is. (Maybe resolve it later.)
  • Change all the <emu-note> summaries to <p> summaries.
  • Change all the <p> summaries to <emu-note> summaries.
  • Change all summaries to something different. (e.g., <p class="summary"> or <div class="summary">. It could get some distinctive styling and we could explain its status in the frontmatter.)
  • Delete all summaries.

There's a related oddity that sometimes a summary-as-Note appears after the <emu-alg>.
E.g.

We could easily move these up, but it's maybe not worth it until we have a solution to the Note-vs-p problem.


Personally, I think we should mark summaries with something like class="summary", style them differently, and say (probably in 18 "ECMAScript Standard Built-in Objects") that they're imprecise, incomplete, and non-normative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant