Jul-31-2019, 05:10 PM
(Jul-31-2019, 01:27 PM)paul18fr Wrote: I cannot tell about the potential advantages of starting with 0, but it's sometime confusing (probably a question of pratice).
(on that specific topic, other languages are more "natural" in my opinion)
Question: is your age confusing or less-natural? Because you are born 0 years old, not 1 year old. Are you confused while calculating your age because it's starts with 0 and not with 1? Probably not
Some relevant pieces of information regarding zero based index:
Why Python uses 0-based indexing by Guido van Rossum
Dijkstra's legendary Why numbering should start at zero (handwritten version)
and finally real reason why 0-based indexing is used:
Quote:So: the technical reason we started counting arrays at zero is that in the mid-1960’s, you could shave a few cycles off of a program’s compilation time on an IBM 7094. 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'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.