4 ms·
Both agree on cardinal numbers (an array [1, 2] has length 2), just not on ordinal numbers (whether the 1 in that array is the "first" or "zeroth" element). I
by weinzierl 2y ago
Both agree on cardinal numbers (an array [1, 2] has length 2), just not on ordinal numbers (whether the 1 in that array is the "first" or "zeroth" element).
I think whenever people say "zeroth" they speak in jest and doubt that there is any disagreement on the fact that the element without predecessor (nowadays in programming most often assigned index 0) is the first element.
You used "first" in that sense naturally just in the sentence before without the slightest notion of ambiguity.
You have lived zero full years and are in the first year of your life.
What people wrongly get riled up with is the fact that ordinal (first) is not in sync with the cardinal (index 0), but it rarely is anyways. If you go to an administrative office and pull your number 5357 no one assumes that there are 5356 people in the queue before them. Your are still the 5th or 10th in line, even if your index is 5357.
- Ukv 2y ago> I think whenever people say "zeroth" they speak in jest and doubt that there is any disagreement on the fact that the element without predecessor (nowadays in programming most often assigned index 0) is the first element. "Zeroth" sounds silly because English has generally settled on one-based indexing, and so typically you'd convert to one-based indexing when speaking out loud or writing something other than code (`users[3]` is the "4th user"). Maybe you could argue that the words "first"/"second", as just some letters/sounds, are not inherently one-based? But I feel that gets a bit dubious from "third" onwards where the connection to numbers is obvious, and with the ordinals frequently spelled as 1st/2nd/etc. But, if you want (and if I'm understanding what you mean), you could replace my statement with: "whether the '1' in that array is the index-1 or index-0 element" - purpose was just to distinguish between ordinals and cardinals, in response to a comment that seemingly implied the cardinality of an empty collection would be 1 with one-based-indexing.