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

Internal Slots should not use dot notation except from a root object #612

Open
ljharb opened this issue Sep 27, 2021 · 3 comments
Open

Internal Slots should not use dot notation except from a root object #612

ljharb opened this issue Sep 27, 2021 · 3 comments
Labels
c: spec Component: spec editorial issues s: comment Status: more info is needed to move forward
Milestone

Comments

@ljharb
Copy link
Member

ljharb commented Sep 27, 2021

See https://github.com/tc39/ecma402/pull/603/files#r693381025 - basically, referencing an internal slot by itself makes sense, like it's a property, and navigating off of an object through internal slots makes sense, but [[a]].[[b]] without an object is very confusing to me.

@ryzokuken ryzokuken added c: spec Component: spec editorial issues s: comment Status: more info is needed to move forward labels Sep 27, 2021
@ryzokuken
Copy link
Member

@sffc @gibson042 @leobalter thoughts?

@sffc
Copy link
Contributor

sffc commented Aug 27, 2024

The section of the spec in question is entitled "Internal Slots", and it is well understood (and consistent with the rest of ECMA-402) that a floating [[x]] refers to the internal slot of the object whose prototype is being described. For example, the section in question is 10.2.3:

  • 10 Collator Objects
    • 10.2 Properties of the Intl.Collator Constructor
      • 10.2.3 Internal slots

So I think this issue should be closed.

@sffc sffc added this to the ES 2025 milestone Aug 27, 2024
@ljharb
Copy link
Member Author

ljharb commented Aug 27, 2024

That's certainly yalls call, but "well understood" is subjective, and I personally find it confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: spec Component: spec editorial issues s: comment Status: more info is needed to move forward
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants