3 ms·
I am impressed modern languages haven't adopted 1-indexed array. This was a design mistake from BCPL and C.
by G4BB3R 6y ago
I am impressed modern languages haven't adopted 1-indexed array. This was a design mistake from BCPL and C.
- sitkack 6y agoLua was initially designed as a data description language for Oil and Gas simulations written in Fortran. 1 based indexing makes perfect sense in that context.
- idle_zealot 6y agoHaving 0-indexed arrays[1] makes sense. It's lists[1] that should be 1-indexed. [0]: where "array" means contiguous memory. [1]: where "list" refers to a high-level collection of elements