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

By the way, you don't need a _ assignment there. You can just do i := range mySlice.


Which I still do constantly, then get a compile error when what I thought was something else is actually an int.


That's a good reason to always include both parts of the LHR:

because if that "something else" actually is an int -- then you'll have a nasty bug at your hands (and not a compiler-catchable one at that).




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

Search: