Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: I prefer my indexes to start at:by ninto1 (Novice) |
on Sep 05, 2022 at 13:31 UTC ( [id://11146702]=note: print w/replies, xml ) | Need Help?? |
Isn't it more efficient in binary? Example for 4 bit: 0000 = 0 0001 = 1 0010 = 2 -... And starting at 1 would waste the 0000 state. I think this is why starting at 0 is the more natural way to count in basic electronics in my opinion, which is how I think it made its way into C. Nowadays it is almost obsolete, but changing so old standards can often be hard to become used to for expierienced programmers, and those mistakes mostly just happen to novice ones, who are not the ones designing new languages. Hope I could make you see another side of this debate. Greetings, Ninto
In Section
Past Polls
|
|