From: Robert Dober Date: 2007-07-17T14:47:06+09:00 Subject: Re: The Pebble in the Ruby Shoe On 7/16/07, Martin DeMello wrote: > 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 No I do not believe so, your approach was accepted only that, instead of the arithmetic mean, the geometric mean has eventually been chosen. You have a lot of merit in this compromise and I want to thank you on behalf of the Ruby Community. Robert -- I always knew that one day Smalltalk would replace Java. I just didn't know it would be called Ruby -- Kent Beck