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

If you ever have to pack multidimentional data in a flat array, I wish you luck, then. In this case, starting at 1 messes up lookup and insertion. You have to insert "-1" or "+1" pretty often. Too hard to get right in my opinion, I prefer the easier way: to start at 0.


Shouldn't the "index start value" just be a compilation directive?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: