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: Prefix names of intrinsics #843

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

linusg
Copy link
Member

@linusg linusg commented Nov 21, 2023

Closes #842.

Not sure if the same naming scheme is appropriate for %SegmentIteratorPrototype% and %SegmentsPrototype%, but happy update those as well if wanted.

@ljharb
Copy link
Member

ljharb commented Nov 21, 2023

The rule is that anything that's accessible off of a top-level intrinsic, should be - so if %Segments% exists, then i'd expect %Segments.prototype%, etc.

@linusg
Copy link
Member Author

linusg commented Nov 21, 2023

%Segments% doesn't exist, the object is created directly in an AO (https://tc39.es/ecma402/#sec-createsegmentsobject):

1. Let internalSlotsList be « [[SegmentsSegmenter]], [[SegmentsString]] ».
2. Let segments be OrdinaryObjectCreate(%SegmentsPrototype%, internalSlotsList).

Same for %SegmentIteratorPrototype% (https://tc39.es/ecma402/#sec-createsegmentiterator):

1. Let internalSlotsList be « [[IteratingSegmenter]], [[IteratedString]], [[IteratedStringNextSegmentCodeUnitIndex]] ».
2. Let iterator be OrdinaryObjectCreate(%SegmentIteratorPrototype%, internalSlotsList).

@ljharb
Copy link
Member

ljharb commented Nov 22, 2023

Gotcha; then those two would remain as-is.

Copy link
Contributor

@gibson042 gibson042 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great! I'm thinking it also needs to include oldids attributes for preserving any current inbound links, and possibly renaming %SegmentsPrototype% to %IntlSegmentsPrototype% and %SegmentIteratorPrototype% to %IntlSegmentIteratorPrototype% as well.

@linusg linusg changed the title Editorial: Prefix names of intrinsics exposed on the Intl object Editorial: Prefix names of intrinsics Dec 14, 2023
@linusg
Copy link
Member Author

linusg commented Dec 14, 2023

Done! I don't think any IDs are changed by the first commit (all links reference the public names already), but I've included oldids in the second change.

@gibson042 gibson042 merged commit 537afda into tc39:master Dec 15, 2023
2 checks passed
@linusg linusg deleted the prefix-intrinsics branch December 15, 2023 21:29
ben-allen added a commit to ben-allen/proposal-intl-duration-format that referenced this pull request Nov 6, 2024
…insic form.

See:
tc39/ecma402#843 (prefix names of intrinsics)
tc39/ecma402#474 (dotted intrinsic form)
ben-allen added a commit to ben-allen/proposal-intl-duration-format that referenced this pull request Nov 6, 2024
…insic form.

See:
tc39/ecma402#843 (prefix names of intrinsics)
tc39/ecma402#474 (dotted intrinsic form)
ryzokuken pushed a commit to tc39/proposal-intl-duration-format that referenced this pull request Nov 12, 2024
…insic form.

See:
tc39/ecma402#843 (prefix names of intrinsics)
tc39/ecma402#474 (dotted intrinsic form)
ben-allen added a commit to ben-allen/proposal-intl-duration-format that referenced this pull request Nov 13, 2024
…ed intrinsic form. See: tc39/ecma402#843 (prefix names of intrinsics) tc39/ecma402#474 (dotted intrinsic form)
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

Successfully merging this pull request may close these issues.

Should intrinsics be scoped?
3 participants