From: Steven Lumos Date: 2007-07-20T03:46:11+09:00 Subject: Re: The Pebble in the Ruby Shoe Chad Perrin writes: > On Thu, Jul 19, 2007 at 09:10:22AM +0900, Steven Lumos wrote: >> SonOfLilit writes: >> > I disagree. Zero based arrays are natural to a mathematician, and >> > programmers tend to be mathematicians. >> >> No! This is a systematic lie used to defend a convention that was >> adopted for purely practical reasons. It's like claiming that >> segmented memory is more natural to mathematicians. Mathematicians >> and even Computer Scientists consistently use 1, e.g. > > Yes and no. I wouldn't call it "systematic", but it's certainly a > falsehood, even if propagated largely by accident or with innocent > misunderstanding. Excepting in the sense that one can regard computer > science as an alternate and self-contained mathematics, quite distinct > from the mainstream "mathematics" field of study, programmers are not so > universally mathematicians as so many people seem so convinced they are. > > The fact that mathematicians these days tend to end up being programmers > does not translate to programmers tending to be mathematicians. This is > not a one-to-one correspondence. > > As you say, the zero-based array is a practical matter related to the > work of programming (as well as being related to the applicability of set > theory to language design), and not a convenience for those wacky > mathematicians with their nonstandard way of counting (kind of a strange > claim to make). In contrast with your implication that this is somehow a > *bad* practical decision, however, it's actually the case that, by and > large, the benefits for natural sequential operations in programming and > the in-built compatibility of zero-based arrays with certain concepts of > set theory add up to a strikingly practical, and quite positive, reason > for zero-based arrays. Not only did I not mean to imply that, but I'm not sure I can even parse "bad practical decision". If I knew the evidence I had implied in support of my implied claim then maybe I could. :-) But I even explicitly said that "It's a good and safe decision supported by decades of computing convention and habit..." > In other words, your premises are largely correct, but they do not lead > to the conclusions you seem to suggest. I'm just sick of hearing that Ruby does such and such because mathematicians like it. Steve