5 ms·
Zero based indexing is not a C artifact. Here's Dijkstra writing about it in '82: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html https:
by pvg 9y ago
Zero based indexing is not a C artifact. Here's Dijkstra writing about it in '82:
https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...
- Bromskloss 9y agoNote how, in the PDF version [0], Dijkstra numbers the pages starting on zero (handwriting, upper right corner), but whoever created the PDF disregarded its message and did numbering starting on one (lower right corner). :-) [0] https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF Edit: Fixed link. Hacker News apparently doesn't understand the delimiting of a URL with "<" and ">". >-( https://tools.ietf.org/html/rfc3986#appendix-C https://tools.ietf.org/html/rfc3986#appendix-C
- Avshalom 9y agoThere's the very real possibility that zero based indexing is in fact a Yacht Racing artifact. http://exple.tive.org/blarg/2013/10/22/citation-needed/ http://exple.tive.org/blarg/2013/10/22/citation-needed/
- Bromskloss 9y ago> The social reason is that we had to save every cycle we could, because if the job didn’t finish fast it might not finish at all and you never know when you’re getting bumped off the hardware because the President of IBM just called and fuck your thesis, it’s yacht-racing time. I don't buy it. Wouldn't people want their programs to run fast regardless of this?
- CyberDildonics 9y agoIn C arrays are given an offset to the pointer, not an index, that is why they start at 0.