Can not inherit NSNumber, NSNull, …, why?-Collection of common programming errors

As with any class cluster, if you create a subclass of NSNumber, you have to override the primitive methods of its superclass, NSValue. Furthermore, there is a restricted set of return values that your implementation of the NSValue method objCType can return, in order to take advantage of the abstract implementations of the non-primitive methods. The valid return values are “c”, “C”, “s”, “S”, “i”, “I”, “l”, “L”, “q”, “Q”, “f”, and “d”.

More precisely, I believe it’s because you never actually have an instance of NSNumber. Objective-C has the interesting property that the initializer of a class can actually change the object to which self points (this might actually be true of any method, but I’ve only ever heard of it being used in the init methods). I believe that NSNumber does this very thing.