1483
Off by one solitude (fed.dyne.org)
you are viewing a single comment's thread
view the rest of the comments
[-] communism@lemmy.ml 6 points 1 month ago

No, there is simply no such thing as "zeroth", that's not how ordinal numbers work. If I have the following numbered list:

  1. Foo

  2. Bar

  3. Baz

The first item is "Foo" which is indexed 5. It is not the fifth item, because the item indexed 5 comes first in the list, so the item indexed 5 is the first item. Ordinal numbers don't refer to index, they refer to order.

[-] NateNate60@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

Okay, I will admit, you got me there. I did confuse indexing with numbering. From now on I will use the term "numbering" instead.

It is entirely how ordinal numbers work in zero-based numbering. There is no "right way" for ordinal numbers to work. You can create a valid ordinal numbering system starting from any integer, or just some other ordered list. You cannot assume one-based numbering is "correct" and use it as an argument against numbering beginning from any other number.

I encourage you read up what is meant by "zero based numbering" because you and everyone else who has replied to me has tried to use "but that's not how it works in one-based numbering" as an explanation for why I'm wrong. This is as nonsensical of an argument as trying to say i (the imaginary unit) is not a number because it's not on the number line. It's only not a number in the domain of the real numbers. Similarly, zero-based numbering is only nonsensical in the context of one-based indexing.

Zero-based numbering would number "foo" as the zeroth element, "bar" as the first element, and "baz" as the second element. "zeroth", "first", and "second" are labels representing ordinals. Your list has a length of 3 (which is a cardinal quantity unrelated to ordinals).

Although, I would like to point out, it is perfectly valid to construct an ordinal labelling system that assigns "fifth" to the element with the lowest index, "sixth" to the next, and so on. That system is mathematically coherent but it is just troublesome to when it comes time to convert ordinal numbers (such as the index of the last fence-post) to cardinal numbers (such as the length of fence to buy).

But this is now getting into the weeds of pure mathematics and most people here are engineers.

[-] xmunk@sh.itjust.works 1 points 1 month ago

Foo is both the first and fifth item - Foo is the first item in that segment (or slice if you're a weird golang programmer) but it is also the fifth item in some sir-not-appears-in-this-film list that is responsible for the odd numbering. If I said "I just finished the fifth item on our todo list" you'd mark off Foo because that's clearly what I was referring to.

Places can have two labels (or more!) and, for bonus points, zeroth is a thing because we both know what that word means.

this post was submitted on 19 Sep 2024
1483 points (98.6% liked)

Programmer Humor

32469 readers
441 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS