--

As I said before, this has absolutely nothing to do with how the language indexes arrays. Value ranges may be used in code without any reference to arrays. The two are completely disparate.

Human beings do not code for the benefit of the computer (e.g., indexing style). They code for the benefit of human understanding of the programming problem.

That's why, for example, languages like Fortran, Julia and Smalltalk use one-based array indexing (because in mathematics, counting typically starts at one).

--

--

Responses (1)