3 ms·
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 li
by jrockway 4y ago
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.
- Dylan16807 4y agoI 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.
- coding123 4y agoBut that is more useful, we should agree, for implementing binary trees or sorting algorithms.