0-based arrays are IMHO simply a consequence of C's array access operator given transparent semantics in terms of pointer arithmetic.
Try some string manipulation using the awk language, which has 1-based strings and arrays, and you'll see that programs and string expressions are generally shorter and more idiomatic.
Later languages building on awk such as Java and JavaScript (awk is almost a subset of, and the inspiration for early JavaScript) have cargo-culted 0 into the language as base offset. Though probably it may have prevented some errors to make commonly used languages behave same in this respect.
> ... 1-based strings and arrays, and you'll see that programs and string expressions are generally shorter and more idiomatic.
Depends very much on what you're doing. If you're doing, say, a filesystem driver, and you need to do math or reasoning on [offset, length] pairs quite frequently, you will find 0-based indexing much more natural. At least that's been my experience. I think some of this applies to strings and memory too.
The way I tried to resolve 0 vs 1 based indexing in my head was is they have slightly different contexts. 0-based indexing tells you have far you are from the origin, the first element whereas 1-based indexing is useful for when thinking about how many elements you have.
Ah, counting vs measuring! That makes a lot of sense.
In the west, we measure our age and start from 0. In China, they count their age (number of distinct years someone has been alive in) and thus start from 1. In fact, in China, if you are born on new years eve you can be 2 years old at 2 days old!
Try some string manipulation using the awk language, which has 1-based strings and arrays, and you'll see that programs and string expressions are generally shorter and more idiomatic.
Later languages building on awk such as Java and JavaScript (awk is almost a subset of, and the inspiration for early JavaScript) have cargo-culted 0 into the language as base offset. Though probably it may have prevented some errors to make commonly used languages behave same in this respect.