4 ms·
> Again on 0-based vs. 1-based indexing The problem is within the phrasing and its premise: Are you using an index or an offset? 99% of the time I think of an
by numlock86 6y ago
> Again on 0-based vs. 1-based indexing
The problem is within the phrasing and its premise: Are you using an index or an offset? 99% of the time I think of an offset, so "first" makes sense as "0". If you go by indexing "1" suddenly makes sense as an index. When people say index in the context of arrays or data structures usually they mean an offset. To me it's simply wrong phrasing.
- pwdisswordfish5 6y agoI don’t know why 1-based-indexing supporters insist on pointing out this distinction. Whenever one indexes some kind of a map with numbers – and it actually matters that they are numbers that you can perform arithmetic on, not just opaque symbols – chances are they will be computed from an ‘offset’ somewhere or vice versa, which means the notions are going to blend a lot.