Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
michaelochurch
on Oct 23, 2013
|
parent
|
context
|
favorite
| on:
Why Python uses 0-based indexing. It's because of ...
I like 0-based indexing because it makes mathematical sense. By the ordinal construction of the natural numbers, e.g. 5 ~= {0, 1, 2, 3, 4}. So an array of length 5 has indexes corresponding to the five set-theoretic elements of 5.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: