|
|
|
|
|
by LoSboccacc
3949 days ago
|
|
_It used to be popular, and still is in some circles, to debate whether programming languages ought start array indexing at 0 or 1_ this is an exemplary case of citation needed if I ever saw one. maybe it's a valid debate for programming languages that doesn't allow people to do pointer arithmetic, which already restrict the field a lot, but even then that's sound as part of the 4GL bullshit that never really took off, and for good reasons |
|
Visual Basic had the "OPTION BASE" statement to select.[0] (Many other versions of basic did too)
APL also has the ⎕IO Index Origin setting [1]
If you want to see a lively debate, there's c2[2], and there's also Dijkstra[3]
[0] https://msdn.microsoft.com/en-us/library/aa266179%28v=vs.60%...
[1] https://en.wikipedia.org/wiki/APL_syntax_and_symbols
[2] http://c2.com/cgi/wiki?ZeroAndOneBasedIndexes
[3] http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF