I understand the reasoning, yet I think the idea of a mutable subclass is dangerous:
The problem is that frameworks don't expect NSDate
instances to change. Thus, they don't copy them where they would in case of NSString
or other classes conforming to NSMutableCopying
.
Also, NSDate
probably implements copy
by just retaining the same instance and returning it. You'd have to override this behavior which, again, might be unexpected.
The idea of an NSDate
(similar to NSNumber
) is to represent an immutable value. It's difficult to imagine how and where the frameworks rely on that fact.