3 ms·
Counting is slightly easier: if you have one object, it has slot number 1, and if you have one more object (meaning you have two objects) that second object has
by shele 8y ago
Counting is slightly easier: if you have one object, it has slot number 1, and if you have one more object (meaning you have two objects) that second object has slot number 2.
PS: I am joking here of course, but seriously, try counting things with your fingers starting with a fist, then one finger, then two.
- geezerjay 8y agoIndexing isn't counting. It represents shifts from the reference position, which is the natural reference when dealing with contiguous objects. Everyone knows that the first floor of a building is right above the ground floor.
- iguy 8y agoAnd even for buildings, we have two conventions in use. Plus a debate about whether the ground floor is really a floor, or whether the word "floor" naturally implies something elevated above the ground...
- pzone 8y ago"Indexing isn't counting" is not a fact; it is a language implementation choice inherited from C. It may be a useful choice for systems programming but it is not necessarily the best choice for every language.