Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
tabtab
on Jan 27, 2020
|
parent
|
context
|
favorite
| on:
Why numbering should start at zero (1982)
That convention seems confusing to me, especially one new to the convention. If you need an explicit "insert at the start" operation, then do something like "x.insertAtStart(y)" instead of "x[0] = y".
monkpit
on Jan 27, 2020
[–]
This is typically built into a language as “x.unshift(y)”
tabtab
on Jan 27, 2020
|
parent
[–]
"unshift" is not very intuitive in my opinion, but let's not get bogged down with API naming design.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: