top | item 45386826

(no title)

throwawayben | 5 months ago

0 based is much simpler for any mathematical calculation done with the indexes. only reasons I can think where you need to handle it is when getting the last index from the length of the array or when interacting with the user. With 1-based you'll need to subtract or add 1 all over the place when doing almost anything

discuss

order

No comments yet.