Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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".


This is typically built into a language as “x.unshift(y)”


"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: