Re: 1-based indexing in Lua or the one without zero
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: 1-based indexing in Lua or the one without zero
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2018年4月22日 20:49:36 +0200
2018年04月22日 18:48 GMT+02:00 Francisco Olarte <folarte@peoplecall.com>:
> On Sun, Apr 22, 2018 at 5:43 PM, ag <aga.chatzimanikas@gmail.com> 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.