|
|
Re: The perpetual calendar
Posted:
Feb 26, 2010 2:21 PM
|
|
On Feb 26, 12:33 pm, Roland Hutchinson <my.spamt...@verizon.net> wrote: > On Fri, 26 Feb 2010 10:00:40 +1100, Peter Moylan wrote: > > Adam Funk wrote: > >> On 2010-02-24, Bob Myers wrote: > > >>> Andrew Usher wrote: > > >>>> Well, I'm astounded. Indexing from 0 is so obviously the Right Way > >>>> that I can't imagine why anyone would do it the other way. > >>> Oh, absolutely. Why, I see people in the stores every day, counting > >>> out their money or the number of items they're going to purchase, and > >>> saying to themselves "Zero, one, two..." > > >> The initialized state of my shopping basket contains 0 items. Each > >> item I put in increments it. If I initialized at 1, my shopping would > >> crash with a 1-off error on unpacking. > > > If your shopping basket had been designed by a C programmer, its initial > > state would be the state just before the zeroth item was inserted. That > > suggests that initially the basket contains -1 items. > > "So I said to him, 'Moore, have you less than no apples in that > basket?"..."
False, of course.
> > -- > Roland Hutchinson > > He calls himself "the Garden State's leading violist da gamba," > ... comparable to being ruler of an exceptionally small duchy. > --Newark (NJ) Star Ledger (http://tinyurl.com/RolandIsNJ)- Hide quoted text - > > - Show quoted text -
|
|