I'm looking through the source code for the CocoaHTTPServer project, more specifically the HTTPServer.m
file and I just don't understand this line:
connectionClass = [HTTPConnection self];
What does this do (is it documented anywhere)? How does it even compile? Should it not be
connectionClass = [HTTPConnection class];
self
called on a class returns the class. The tricky part is why methodclass
called on a class returns the class and not its metaclass :) – Booma[ClassName self]
instead of[ClassName class]
. That would reduce the confusion between+class
and-class
. But alas, it's pretty ingrained at this point – DissentiousClassName class
does return the metaclass ;) – Dissentious