Why doesn't NSOrderedSet inherit from NSSet?
Surely an ordered set is a more-specific case of a set, so why does NSOrderedSet inherit from NSObject rather than NSSet ? I went through the interface of NSSet and you're right, ordered sets appear to satisfy the Liskov substitution principle and could therefor inherit from NSSet . There is one little method that breaks this: mutableCopy . The return value of mutableCopy must be an NSMutableSet , but NSMutableOrderedSet should inherit from NSOrderedSet . You can't have both. Let me explain with some code. First, let's look at the correct behaviour of NSSet and NSMutableSet : NSSet* immutable