Defend zero-based arrays
Posted
by DrJokepu
on Stack Overflow
See other posts from Stack Overflow
or by DrJokepu
Published on 2008-12-26T04:12:05Z
Indexed on
2010/06/18
14:43 UTC
Read the original article
Hit count: 370
A question asked here recently reminded me of a debate I had not long ago with a fellow programmer. Basically he argued that zero-based arrays should be replaced by one-based arrays since arrays being zero based is an implementation detail that originates from the way arrays and pointers and computer hardware work, but these sort of stuff should not be reflected in higher level languages.
Now I am not really good at debating so I couldn't really offer any good reasons to stick with zero-based arrays other than they sort of feel like more appropriate. I am really interested in the opinions of other developers, so I sort of challenge you to come up with reasons to stick with zero-based arrays!
© Stack Overflow or respective owner