From: Martin DeMello Date: 2007-07-17T01:32:28+09:00 Subject: Re: The Pebble in the Ruby Shoe On 7/16/07, Axel Etzold wrote: > > Raphael Gillett wrote the following on 16.07.2007 15:22 : > > > [...] > > > The pebble in the Ruby shoe is the counter-intuitive use of indexing of > > > elements of arrays, strings, etc., from 0 to n-1 instead of the more > > > natural 1 to n. Like prisoners who have got used to their chains, the > > > Ruby community seems to have meekly accepted this impediment to clear > > > thinking. > > Dear Raphael, > > from http://www.americanscientist.org/template/AssetDetail/assetid/51982?&print=yes, > > an overview article about the history of around 6000 computer programming > languages: > > > > "Still another perennially contentious issue is how to count. This one brings out the snarling > dogmatism in the meekest programmer. Suppose we have a list of three items. Do we number > them 1, 2, 3, or should it be 0, 1, 2? Everyone in computerdom knows the answer to that > question, and knows it as an eternal truth held with the deepest, visceral conviction. Only one of > the alternatives is logically tenable. But which is it ?.." Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. -- Stan Kelly-Bootle martin