5 ms·
"Some people" is understated; if you're holding one orange and I ask for your first orange then you give me that one, in your first hand. I'm over-emphasising b
by jebus989 13y ago
"Some people" is understated; if you're holding one orange and I ask for your first orange then you give me that one, in your first hand. I'm over-emphasising but the point is that no zeroes are involved.
It's a trade-off, if we were bending entirely to the computer's will we'd all be programming machine code, whereas there's overhead in using more natural language. Honestly I've bought this 0-indexing is the Right Way for a long time but the more I use R the more a 1-index seems to make sense for high-level languages.
- loxs 13y agoSame thing with Erlang... it seemed so weird at start... now I hate all 0-indexed languages.
- mtdewcmu 13y agoWell, frankly, I always thought 0-indexing made perfect sense, given the elegant symmetry with pointer arithmetic in C. It also makes sense in that variables are naturally initialized to zero, and that puts an index right at the start of an array. Everything just falls into place.
- paulnechifor 13y ago> if you're holding one orange and I ask for your first orange then you give me that one, in your first hand. I'm over-emphasising but the point is that no zeroes are involved. No ones are involved either. I don't have a "first" hand and when you request a first orange, you're just asking for the head of the ordered set.
- jebus989 13y agoI get it, believe me I do, but pedantry aside, we know how any non-computer scientist or programmer would address the initial item of any sequence (indeed the same way a mathematician would).
- dspig 13y agoWell, you don't have to use the 0th index, it's better than wanting to in a language where you can't!
- lucideer 13y agoAn index is the beginning of a unit - the point at which it is found, where it begins. The index doesn't represent the unit itself, just where it is located. Your orange takes the zeroth index becoming the first orange: http://i.imm.io/1lWRO.png http://i.imm.io/1lWRO.png People understand the concept of zero perfectly. They know the day doesn't begin at 1am, they know babies aren't born 1 years old. This isn't a computer-specific concept in any way.
- jebus989 13y agoThis confuses measuring continuous variables with discrete indexing. I'm certainly not arguing that zero isn't a well-understood concept.
- adam-a 13y ago> They know the day doesn't begin at 1am, they know babies aren't born 1 years old. This isn't a computer-specific concept in any way. This is true, and an interesting point, but also nobody describes a baby as being zero years old, or the time as being zero-o'clock. People avoid zero in these situations and find alternatives - i.e. 3-months or 12.30am. Personally I see both sides but the point is that whenever you make something divisible, the first unit is 1 and that's what people call it.
- tmoertel 13y agoActually, in the US military, it's common to refer to the first hour of the day as zero. As in, "zero hundred thirty hours" for 30 minutes after midnight.
- mmorris 13y agoThat the clock starts at 12 has annoyed me for quite a long time (i.e., 12PM comes before 1PM). I kind of wish that non-military usage also used 0:00-11:59, if only for the logical consistency of it. Alternatively we could just switch 12PM and 12AM, but that would mess with midnight == start of the day. Unfortunately I think I'm doomed to suffer through this inconsistency, since it doesn't seem to bother anyone else.
- zvrba 13y ago> I ask for your first orange then you give me that one, in your first hand It's the difference between ordinals and cardinals. In human languages I see ordinals as a pure shorthand: you could just as well say "give me orange number zero", except it's more cumbersome. I honestly can't think of a context (in human languages) where ordinals would be something more than a mere convenience. I believe the existence of ordinals is a technically unnecessary historical artifact: counting was invented before zero. PS: I doubt people number their hands. A person would say "in your left hand", not in "your first hand".