General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Mikko Rantalainen
ThePrimeTime
comments
Comments by "Mikko Rantalainen" (@MikkoRantalainen) on "You Are WRONG About 0 Based Indexing" video.
I think people should just stop speaking about "indexing" but talking about "offset" instead. Then it would be much easier to wrap your mind around the concept correctly. It's obvious that offset from the start for the first item is zero. You can dedicate the word "indexing" for pre-computing search data. As in search indexing. Languages other than C use offsets, too, because the offset counts elements, not memory addresses. And one could argue that C counts elements, too, not memory addresses because s = s + 1 goes N bytes forward when s points to type longer than 1 byte. And you'll always have off-by-1 errors regardless if you call your things "index" or "offset". The best thing you can make is to avoid using words that have mixed historical meaning, for example "index". There's no similar mixed usage for word "offset".
1