3 ms·
Here’s the ultimate authority on why computer languages should count from zero: <https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF https://www.cs.utexas.e
by teddyh 3y ago
Here’s the ultimate authority on why computer languages should count from zero:
<https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF https://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF>
- ethbr1 3y agoThere are linguistic arguments that suggest 1-basing. [1] [1] http://kilby.stanford.edu/~rvg/ordinal.html http://kilby.stanford.edu/~rvg/ordinal.html
- catchnear4321 3y agothis is unfortunately not an entirely good argument… > Then the colleague continues by numbering the next apple "126", and the process ends at "188". At that point the colleague has to guess whether the counting started at 0 or at 1, i.e. whether the total number of apples is 188 or 189. false. the next person, having heard 188, only needs to know what follows. 189. as this is a job that has been divided, so long as the beginning stage is recorded somewhere, as well as the end stage, each worker (save first and last) exclusively need to know the number of the apple prior to their first for their first apple is not zero or one, it is the number immediately following last. n+1. counting could have started at -1. heathen.