Skip to content

Comment on If you gaze into nil, nil gazes also into youparent

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.