5 ms·
Traditionally this is taught to noobs on a blackboard or I suppose powerpoint now. One based indexes are just going to confuse the noobs even worse. "So a[2]
by VLM 13y ago
Traditionally this is taught to noobs on a blackboard or I suppose powerpoint now.
One based indexes are just going to confuse the noobs even worse. "So a[2] means get me the data offset by one from a" "uh what, don't you mean offset by two?" "No somebody said pointer arithmetic would be simpler if you had to memorize a bunch of different times to add or subtract one, just as a barrier to entry". "Oh well that sucks. Someone should invent a zero indexed array language..."
- k__ 13y agoHum, funny... I always thought about arrays as pointers (at least in C), like it's just syntactical sugar for specific kind of pointer.