Pascal had indexes starting at 1 too.
Starting indexes at 0 makes sense when you want to enable the developer to manipulate memory (for example, C)
Indexes starting at 1 matches with a more natural ordinal sequencing.
Starting indexes at 0 makes sense when you want to enable the developer to manipulate memory (for example, C)
Indexes starting at 1 matches with a more natural ordinal sequencing.
If it’s the second option, why has (almost) every other language chosen with a GC to start arrays with 0?
"I don't understand the word 'index'".
- a functional programmer