3 ms·
I'm struggling to find Dijkstra's argument sufficiently compelling to conclude that zero is the 'most natural number'. It's a conclusion based on his aesthetics
by fractallyte 15y ago
I'm struggling to find Dijkstra's argument sufficiently compelling to conclude that zero is the 'most natural number'. It's a conclusion based on his aesthetics (plus an anecdotal story).
The natural numbers are generally considered to start at 1. Therefore, to people in general, such a system makes more sense.
- r00fus 15y agoAgreed. The fact that arrays were simple memory-offsets making zero-index easier for low-level programming doesn't make it easier for humans who historically prefer 1-indexing. Zero is not a "natural" number, in fact many societies / civilizations never even understood or used zero in arithmetic [1]. [1] http://en.wikipedia.org/wiki/Roman_numerals http://en.wikipedia.org/wiki/Roman_numerals
- technomancy 15y ago> in fact many societies / civilizations never even understood or used zero in arithmetic Yeah, but those societies were uniformly terrible at math.
- gaius 15y agoThere are Roman bridges still standing, and Roman roads still in use.
- fractallyte 15y agoTherefore, with the concept of 'zero' in mind, I'm going to revisit the parent statement: If I hold up my fingers to indicate elements in an array, zero fingers means the array is empty. One finger is then, naturally, the first item: of index 1. Counting elements starting at zero (for the first element) is still unnatural...
- joe_the_user 15y agoNo, there really are no any societies that "terrible" at math, only societies that have evolved more sophisticated math than others - the smartest member of given society will certainly use the concepts the society has evolved correctly. And you only need 1...N to order N bins and their contents.
- ths 15y agoDuring my math undergrad, the natural numbers were always assumed to start with 0, the rationale being that the natural numbers should enumerate the cardinalities of all finite sets (the empty set, of course, being finite). I guess it depends on one's background.
- joe_the_user 15y agoThere wasn't such consistency in my math undergrad or masters programs. Further, the Peano postulates definitely involve the natural numbers starting at 1. Of course, most programmers don't have math degrees and I'd suspect that most people indeed think 1st element of an array starts at 1.