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: Add notes about the 1-based indexing of regular expression _captures_ #2150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gibson042
Copy link
Contributor

Split from #2112; this can be merged as is or built upon/superceded by a switch to zero-based indexing.

@michaelficarra
Copy link
Member

michaelficarra commented Aug 26, 2020

@gibson042 The editors would like to avoid using the 1-indexed lists for this purpose, as they are poorly specified and this is the only use for them. Our preferred strategy is to use a regular (0-indexed) spec list for this with the first element populated by ~empty~. We also considered an alternative of maintaining an offset of 1 everywhere the lists are indexed, but decided that that strategy had more risk of being incorrectly implemented. Do you want to update this PR? If not, I can take it (though it may not be very soon).

@gibson042
Copy link
Contributor Author

I may not get to it quickly either, so let's just agree that whoever is ready to pick it up first should communicate that by posting here.

@ljharb ljharb added editorial change needs editorial changes and removed editor call to be discussed in the next editor call labels Aug 27, 2020
@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants