Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
spullara
on Aug 24, 2022
|
parent
|
context
|
favorite
| on:
Why do arrays start at 0?
0 is offset based. 1 is index based.
thetwentyone
on Aug 24, 2022
[–]
This is my take and when working directly with computer memory/addresses, 0-based is most convenient. For working with data/stuff at a higher level, 1-based is more natural and convenient.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: