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

Yeah. To me, I just think it's weird to ask for two pieces of information and then throw one of them away. Sometimes it's not a performance hit, but I feel like it's one of those things where you should get a feeling "I might be doing this wrong". But if you don't know that < exists (and obviously searched for strings.Less), then you won't get that feeling. That's what I find so fascinating; if other people's feelings are similar to mine, then they simply didn't know that you were allowed to use < here.


I don't see it as two pieces of information. It's returning one idea either way, but the tri-state tells you more than a boolean.


But that is more useful, we should agree, for implementing binary trees or sorting algorithms.




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

Search: