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: Reorganize clauses 6 through 9 #2148

Open
jmdyck opened this issue Aug 20, 2020 · 3 comments
Open

Editorial: Reorganize clauses 6 through 9 #2148

jmdyck opened this issue Aug 20, 2020 · 3 comments

Comments

@jmdyck
Copy link
Collaborator

jmdyck commented Aug 20, 2020

It's a bit odd to me that after discussing objects in 6.1.7 (The Object Type), we talk about some non-object stuff, and then go back to objects in clause 9 (Ordinary and Exotic Objects Behaviours).

Similarly, it's odd that after discussing spec types in 6.2, we talk about other stuff, and then go back to spec types in clause 8 (Executable Code and Execution Contexts).

(In fact, 6.2.6 (The Environment Record Specification Type) is basically just a pointer to 8.1 (Environment Records). So env records "belong" in both places? If we were adding a new spec type, how would we decide whether it goes in 6.2 or 8?)

I suggest reorganizing clauses 6 through 9, so that there's one top-level clause for ES language types, and one for ES spec types.

The result might look something like the following. (Clauses are shown here with their current number and title for ease of reference. Numbers would of course change, titles might change. The order of sibling clauses could be adjusted to taste.)

  • ECMAScript Language Types and Values

    • 6.1.1 The Undefined Type

    • ...

    • 6.1.6 Numeric Types

    • 6.1.7 The Object Type

      • 6.1.7.1 Property Attributes
      • 6.1.7.2 Object Internal Methods and Internal Slots
      • 6.1.7.3 Invariants of the Essential Internal Methods
      • 9.1 Ordinary Object Internal Methods and Internal Slots
      • 9.2 ECMAScript Function Objects
      • 9.3 Built-in Function Objects
      • 9.4 Built-in Exotic Object Internal Methods and Slots
      • 9.5 Proxy Object Internal Methods and Internal Slots
      • 6.1.7.4 Well-Known Intrinsic Objects
    • 7 Abstract Ops
      [Note that everything in clause 7 deals with language values, so putting it here makes sense.]
      [Portions could be split out and moved to more specific spots. E.g. ops concerned with numeric values could move to the Numeric Types clause, ops concerned with Objects could move to the Objects clause.]

  • ECMAScript Specification Types and Values

    • 6.2.1 The List and Record Spec Types [could be split]
    • ...
    • 6.2.7 The Abstract Closure Spec Type
    • 6.2.8 Data Blocks
    • 6.2.6 The Environment Record Spec Type [merged with] 8.1 Environment Records
    • 8.2 Realms
    • ...
    • 8.12 CleanupFinalizationRegistry

I realize that this would change the position and nesting-level of ~6k lines, but Issue #1950 is contemplating a move of at least ~10k lines, so this doesn't seem outrageous.

@michaelficarra michaelficarra added editor call to be discussed in the next editor call and removed editor call to be discussed in the next editor call labels Aug 27, 2020
@michaelficarra
Copy link
Member

@jmdyck Thank you for your suggestion. We'll consider the appropriate organisation after we've completed #1950.

@bakkot bakkot added the editor call to be discussed in the next editor call label Jan 22, 2021
@bakkot bakkot removed the editor call to be discussed in the next editor call label Jun 23, 2021
@syg
Copy link
Contributor

syg commented Jun 23, 2021

The editors haven't really made any progress here on our preference, and given other efforts this reorg is of pretty low priority. In the interest of not doing work that we won't get cycles to review anytime soon, perhaps you'd want to hold off on doing work here, @jmdyck.

@jmdyck
Copy link
Collaborator Author

jmdyck commented Jun 24, 2021

I'll continue to hold off.

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

No branches or pull requests

4 participants