This is the televenth post of my blog.
by Danver Braganza on 2020-09-20
Many programming languages use Zero-Based Indexing for referring to the elements of a list. There are a number of strong technical reasons why this is convenient, but I won't be talking about them this article.
Oftentimes, when discussing zero-based indexing it is useful to refer to the element at the start of the collection as the "zeroth" element, as an analogy to the ordinal "first" in one-based numbering. This serves as a reminder that we're talking about the element at the start, and not the element at position one, which could ambiguously also be referred to as the first. The word zeroth can be used in computer documentation to be rigorously unambiguous.
Because of Benford's Law of Numbers, the use case for the zero-based ordinals numbering beyond one don't come up much. You're much more likely to care about the zeroth element than the element at position 2,235, or ever position 6.
Which means that there may be an open opporunity to propose names for them. I humbly submit:
- and Televenth
I'm appealing to Benford's law again, to justify leaving the numbers beyond the televenth to a future discoverer.
Other articles you may like
- Standardize the Way You Write Your Range Conditionals By always spelling your range conditionals start <= index < capacity, you make your code more easily grokkable and reduce the chance of errors.
- The Empty Case is not Special Instead of explicitly handling the empty case in functions, try this instead.
- Connect Four implemented in 3 lines of Python A tiny implementation of Connect 4 on the terminal, with explanation.