Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.
Stan Kelly-Bootle
There is a fascinating piece by Edsger W. Dijkstra “Why numbering should start at zero” that discuss the various options available for describing ranges and explains why we should prefer one option over the others. Dijkstra is one of a number of programmers who have the ability to look at choices that seem obvious or arbitrary and come up with reasons for preferring one of the choices.
One thought on “Quote of the week – array indices”