|
|
|
|
|
by Spartan-S63
1992 days ago
|
|
If your mental model is that an array is zero-indexed but circular, I think arr[-1] still is consistent with that model. If you don’t think of arrays as circular, then sure, it doesn’t make sense. I’m still in agreement that negative indices make it more confusing than just calculating based off the length, but I get why they exist. |
|