Because that has a different meaning.
[self someMethod]
sends someMethod
to the object, whose reference is stored in the (slightly magic) variable self
.
[SomeClass someMethod]
sends someMethod
to the class object (yes, classes are objects, too), which contains the meta-information for class SomeClass
.
Two different objects ("receivers"). Also note, that there are class methods in Objective-C (i.e., you can take advantage of the fact, that classes are objects, and define new methods for them). Observe:
@interface SomeClass
- (void) someMethod;
+ (void) someMethod;
@end
These are completely different methods, intended for completely different receivers. The method tagged with -
is an instance method (will be used, e.g., with self
). The method tagged with +
is a class method (and will be used with the class object).