You're viewing a single thread.
I like 1-index because its what I learned first, and you like 0-index because that's what you learned first
19 3 ReplyWe just need to compromise, arrays start at 0.5
24 1 ReplyPeak centrism
3 0 Reply
My hot take: There is no such thing as 0-index. If you start with 1 it's an index, of you start with 0 it's an offset.
12 0 ReplyTBF everyone in school learn to start counting at 1, then they unlearn that in programming. There are also some objective reasons to use 0-based indexing https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
5 0 ReplyI learned BASIC first, so... no.
And 0-index is what's real. If you have ever touched hardware that's 1-indexed, your retro hobbies are even more esoteric than mine.
3 0 ReplyI learnt 0-index, still think 1 is more intuitive
1 0 Replyi respect that
1 0 ReplyI like 0 index because it is 2hat is used under the hood. The index is not really an index but rather an offset from the array pointer.
1 0 Reply