On 7/18/07, MenTaLguY <mental / rydia.net> wrote: > On Wed, 2007-07-18 at 16:20 +0900, kevin cline wrote: > > > 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. > > > > With 50+ years of collective experience, it seems clear that zero- > > based arrays lead to the simplest code. > > That's been my personal experience, too -- pretty much the only thing > 1-based indices make simpler is getting the last element of an array > given its size; everything else seems to get more complex. > I do not like categorical statements, but this one might be the exception that confirms the rule. +1 (or was that +0 ;) Robert -- I always knew that one day Smalltalk would replace Java. I just didn't know it would be called Ruby -- Kent Beck