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

The thing I don't get is, rangeCheck doesn't actually _do_ anything. If it was taken out, the code would still function exactly the same, you just wouldn't get a nice exception when you pass in the wrong parameters (it'd still be an exception, just not as useful).

Actually, that's not entirely true. If you swapped the "hi" and "lo" parameters, the function would return an unmodified array if rangeCheck were taken out, rather than throwing an exception. But that's the only functional change.

So the idea that rangeChange is in any way significant is disingenuous at best, I think.



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

Search: