Comment on If you gaze into nil, nil gazes also into youparentComments−SeoxyS15yTrue, that's actually quite a tricky bug. However, that's also a flaw in Cocoa, I think. NSOrderedSame should not evaluate to a falsy value. Rather, the enum should start at 1.−Aqua_Geek15yAgreed. I think the reason it starts at -1 is to make sorting easier.I usually use a category for string comparison so I don't have to think about it.
Comments
True, that's actually quite a tricky bug. However, that's also a flaw in Cocoa, I think. NSOrderedSame should not evaluate to a falsy value. Rather, the enum should start at 1.
Agreed. I think the reason it starts at -1 is to make sorting easier.
I usually use a category for string comparison so I don't have to think about it.