Hacker News new | ask | show | jobs
by Groxx 4913 days ago
I'd argue this is correct. If a is nil, it's not comparable. The alternative would be to throw an exception, which is pretty simple to emulate by checking.

Also, nils aren't allowed in the collection classes, so sorting with compare: will simply never encounter this case.