-
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: Define both integer index and array index using inclusive intervals #2613
Merged
ljharb
merged 7 commits into
tc39:main
from
gibson042:2022-01-array-index-upper-bound-clusivity
May 25, 2023
Merged
Editorial: Define both integer index and array index using inclusive intervals #2613
ljharb
merged 7 commits into
tc39:main
from
gibson042:2022-01-array-index-upper-bound-clusivity
May 25, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gibson042
force-pushed
the
2022-01-array-index-upper-bound-clusivity
branch
from
February 12, 2023 17:59
679a26d
to
7833ae4
Compare
gibson042
changed the title
Editorial: Define both integer index and array index using closed intervals
Editorial: Define both integer index and array index using inclusive intervals
Feb 12, 2023
michaelficarra
approved these changes
Feb 22, 2023
syg
approved these changes
May 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % question
michaelficarra
added
the
ready to merge
Editors believe this PR needs no further reviews, and is ready to land.
label
May 25, 2023
syg
approved these changes
May 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still lgtm, thanks!
ljharb
force-pushed
the
2022-01-array-index-upper-bound-clusivity
branch
from
May 25, 2023 16:54
12bc338
to
86614b7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
editorial change
ready to merge
Editors believe this PR needs no further reviews, and is ready to land.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think #2502 stems in part from inconsistency in the definition of integer index with an inclusive upper bound of 2**53 - 1 vs. array index with an exclusive upper bound of 2**32 - 1, obscuring the fact that only the latter excludes the integer immediately preceding the relevant power of two (because array length rather than maximum index is constrained to uint32). This is an attempt to clear that up by defining both terms as analogous inclusive intervals (with clearly different upper bounds), along with some miscellaneous related improvements in separate commits.
Alternatively, it might make sense to use analogous half-open intervals, e.g. +0𝔽 ≤ i < 𝔽(253) vs. +0𝔽 ≤ a < 𝔽(232 - 1).