From: Adrian Howard Date: 2007-07-17T22:43:35+09:00 Subject: Re: The Pebble in the Ruby Shoe On 17 Jul 2007, at 14:27, James Edward Gray II wrote: > On Jul 17, 2007, at 7:58 AM, Adrian Howard wrote: > >> >> On 16 Jul 2007, at 19:22, Lloyd Linklater wrote: >> >>> Tim Pease wrote: >>>> Actually, if Ruby had been implemented in Fortran or Pascal, >>>> then most >>>> certainly arrays would have begun indexing with 1 instead of 0. >>> >>> Ok, I know that this is not a Ruby point, but I feel compelled to >>> respond. The basic array in Pascal is zero based. >> [snip] >> >> Fortran doesn't care much either. There's a convention for >> starting at 1, but the language allows you to specify an arbitrary >> index range for your arrays. > > Perl copied that misfeature, though it defaults to zero, in the > hopes of attracting Fortran programmers. Perl's misfeature is pretty different - it's a global rather than a per-array thing. Being able to say "this particular array has indices -10 -> 10 is considerably more useful than saying "every array starts at -10" :-) > What they learned was that it breaks way too much. I'm pretty > sure it's being removed in Perl 6. It is. Everybody admits it was a bad idea. Adrian