|
|
|
|
|
by zajio1am
1388 days ago
|
|
> The 1 makes a lot of sense in a human world, when we count, we start at 1, we talk about the "1st", counting on finger starts with 1, etc. It is more like counting from 1 is just a leftover from times where zero was not commonly considered as number. Once one have zero, it makes sense to use it as an initial ordinal (see e.g. set theory, where zero is both initial ordinal and initial cardinal number, way before computers). Another example is time and date, we start counting of days from 1, but counting of hours (at least in 24-hour notation) and minutes from 0. > Luis started explaining why Lua was 1-index with this sentence: "The 1st argument ...." Note that for spoken language, it is "The first argument ..." and 'first' is etymologically unrelated to 'one', but related to 'foremost', 'front', so it make sense to use 'first' for the initial item in the sequence even when using counting from 0. |
|
This is of course different for continuous quantities. When counting seconds, for example, we should absolutely start from 0.