Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re: I prefer my indexes to start at:
in thread I prefer my indexes to start at:

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146702]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-23 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found