Python "why" questions

Ian Kelly ian.g.kelly at gmail.com
Sat Aug 7 22:08:05 EDT 2010


On Sat, Aug 7, 2010 at 1:14 PM, John Nagle <nagle at animats.com> wrote:
>   FORTRAN, MATLAB, and Octave all use 1-based subscripts.
>
>   The languages which have real multidimensional arrays, rather
> than arrays of arrays, tend to use 1-based subscripts.  That
> reflects standard practice in mathematics.

I propose that this has less to do with the fact that those languages
have "real" multidimensional arrays, and more to do with the fact that
those languages are designed for doing mathematics.  C, Oberon, and
others also have "real" multidimensional arrays, and use 0-based
subscripts.  Standard practice in mathematics is not necessarily best
practice in programming.

Cheers,
Ian



More information about the Python-list mailing list