3 ms·
3 is not a good reason. i It's the developer's job to not screw up. What's the alternative?
by ramon156 2y ago
3 is not a good reason. i
It's the developer's job to not screw up. What's the alternative?
- orlp 2y agoI would normally agree, but the author went out of their way to check for error conditions in their binary search. I think a silent infinite loop is antithetical to that.
- gpm 2y agoThis is a case where less abstraction would make the bug a lot more obvious. Binary search is simple enough that I don't think a generic implementation of it is worth introducing the possibilities of errors at a distance like that one.
- deleted 2y ago[deleted]