[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: 1-based indexing in Lua or the one without zero
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 22 Apr 2018 20:49:36 +0200
2018-04-22 18:48 GMT+02:00 Francisco Olarte <email@example.com>:
> On Sun, Apr 22, 2018 at 5:43 PM, ag <firstname.lastname@example.org> wrote:
>> So, lets say that we could talk with a just born human child, and asked him:
>> how old are you?
>> Is not one, but is not zero either. He actually is zero and an offset.
> That question is not counting, is measuring. The thing is sufficiently
> old people normally reply in truncated years.
We actually have at least four ways of counting.
1. Fortran, Lua etc: from 1 to n.
2. C, Python etc: from 0 to n-1.
3. When pacing off a fixed length, or counting a time interval: from 0 to n.
4. When launching a rocket, detonating an explosive device etc: from n
backwards to 0.