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

Revisit negative array indexing #1222

Open
ricardbejarano opened this issue Mar 14, 2025 · 0 comments
Open

Revisit negative array indexing #1222

ricardbejarano opened this issue Mar 14, 2025 · 0 comments

Comments

@ricardbejarano
Copy link

So while this was discussed in #113 back in 2016, I wonder if we should revisit this discussion given the recent changes to array slices in #1093.

With array slicing supporting negative indexes, I find it counterintuitive not to have negative indexing in regular array lookups. Especially as we seem to approximate Python's slicing, and Python does have negative indexing.

@sparkprime you made a good argument against it here, I'm curious if you've changed your mind as hinted here.

Note: I've had this related PR in go-jsonnet open for a while.

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

2 participants