2 ms·
that is indeed all considerably superfluous and a distraction from the one true law. the first element of an array is at index zero. only a filthy heathen sta
by catchnear4321 3y ago
that is indeed all considerably superfluous and a distraction from the one true law.
the first element of an array is at index zero. only a filthy heathen starts at one. to add a one to the beginning is arrogance, the mark of a human needing to see itself everywhere, while zero is pure, a beginning.
in before some one-head leaves a half-baked comment about why it makes more sense for the first element to start with one because one and first are same but different. so childish.
- teddyh 3y agoHere’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.