3 ms·
Most math books are written in a way where 1 is the first element. So if you take math examples and translate to code, it works more naturally. Also this is ho
by socialdemocrat 6y ago
Most math books are written in a way where 1 is the first element. So if you take math examples and translate to code, it works more naturally.
Also this is how you talk normally. You don't talk about the zeroth-column or zeroth-row in daily speech. You talk about first column and first row.
Only reason 0 based indexing make sense to me is because I began programming as a teenagers and was forced to get accustomed to it. But I remember struggling with it. Yes when working with memory, pointers etc it is more elegant. But if you are not, then I think 1-based indexing looks better.