Re:Why we created Julia - new language for fresh approach to...
by StefanKarpinski on Saturday February 18, 2012 @06:57PM
(#3608128)
Well, for what it's worth, I certainly also "grew up" with 0-based indexing (actually, literally grew up since I was a kid when I learned Pascal). I'm just saying that 1-based has really grown on me and that I find myself thinking about avoiding off-by-one errors far less often when using 1-based indexing. There are other times when I really wish I was using 0-based indexing. However, I find that that latter are more often times when I'm doing libraryish internals code, whereas the former are more common when I'm doing high level userish code.
[ Parent
| on HN ]
Re:Why we created Julia - new language for fresh approach to...
by Peaker on Sunday February 19, 2012 @04:23AM
(#3609029)
My experience is the exact opposite.
I find 1-based indexing to be weird/illogical and prone to off-by-1 errors.
Inclusive/exclusive ranges as in Python along with 0-based indexing means the likelihood of any off-by-1 is negligible...