Curious about @selector


#1

I see and understand the purpose of @selector, but I have a question. Every place we see the selector: as part of a method, it is followed by the @selector(theMethod), for instance (ha!, instance, get it?):

[[NSNotificationCenter defaultCenter] addObserver:logger selector:@selector(zoneChange:) name:NSSystemTimeZoneDidChangeNotification object:nil];

or:

__unused NSTimer *timer = [NSTimer scheduledTimerWithTimeInterval:2.0 target:logger selector:@selector(sayOuch:) userInfo:nil repeats:YES];

My question is, why not build that decoding function in instead of having to use @selector all over the place? Is it just used in too many places in the libraries/frameworks to reasonably do that? Or are there times when you would actually put the number of the selector in there?