Revisit negative array indexing
- Dominant language
- Jsonnet
- Stars
- 7.6k
- Forks
- 475
- PR merge metrics
- No merged PRs in 30d
Description
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](https://github.com/google/jsonnet/issues/113#issuecomment-195693902), I'm curious if you've changed your mind as hinted [here](https://github.com/google/jsonnet/pull/1093#issuecomment-1589976513).
Note: I've had [this related PR in go-jsonnet](https://github.com/google/go-jsonnet/pull/777) open for a while.
Contributor guide
Assessment
This issue has not been assessed yet.