Skip navigation.
 
mlRe: Guidance for Cocoa's steep learning curve
FROM : Jens Alfke
DATE : Thu May 15 16:59:48 2008

On 14 May '08, at 10:16 PM, David Wilson wrote:

> 3) Instance methods (with the -) are virtual functions. Class 
> methods (with the +) are static functions.


Class methods aren't exactly like static functions, because they're 
still dynamically dispatched and can be overridden by subclasses.

A closer analogy is to think of there being a singleton "class object" 
for every class (which is what -class returns), and the class methods 
are instance methods of those class objects. The class objects have an 
inheritance hierarchy that parallels the class hierarchy, so if B is a 
subclass of A, B's class object will be a subclas of A's class object.

(For more detail, look up "metaclass"; I'm sure there's an abstruse 
Wikipedia article about it. The concept goes back to Smalltalk-80, on 
which Objective-C's runtime model and syntax were based.)

—Jens

PS: In regards to the thread subject, I didn't find Cocoa to have a 
steep learning curve. I took a training class and was amazed at how 
easy it was to learn, and to build sophisticated apps with, compared 
to every other GUI API or framework I'd used.

Related mailsAuthorDate
mlGuidance for Cocoa's steep learning curve Erik Buck May 15, 03:19
mlRe: Guidance for Cocoa's steep learning curve Ricky Sharp May 15, 04:26
mlRe: Guidance for Cocoa's steep learning curve Scott Ribe May 15, 05:33
mlRe: Guidance for Cocoa's steep learning curve David Wilson May 15, 07:16
mlRe: Guidance for Cocoa's steep learning curve Jens Alfke May 15, 16:59
mlRe: Guidance for Cocoa's steep learning curve Scott Ribe May 15, 17:18
mlRe: Guidance for Cocoa's steep learning curve colo May 15, 17:21
mlRe: Guidance for Cocoa's steep learning curve Uli Kusterer May 15, 17:54
mlRe: Guidance for Cocoa's steep learning curve colo May 15, 18:03
mlRe: Guidance for Cocoa's steep learning curve Jens Alfke May 15, 21:06
mlRe: Guidance for Cocoa's steep learning curve Stefan Werner May 15, 21:17
mlRe: Guidance for Cocoa's steep learning curve Scott Ribe May 15, 21:53
mlRe: Guidance for Cocoa's steep learning curve Bruno Sanz Marino May 16, 00:39
mlRe: Guidance for Cocoa's steep learning curve mmalc crawford May 16, 02:03
mlRe: Guidance for Cocoa's steep learning curve Jens Alfke May 16, 03:06
mlRe: Guidance for Cocoa's steep learning curve Joseph Ayers May 16, 03:33
mlRe: Guidance for Cocoa's steep learning curve Jens Alfke May 16, 04:07
mlRe: Guidance for Cocoa's steep learning curve mmalc crawford May 16, 06:12
mlRe: Guidance for Cocoa's steep learning curve James Merkel May 16, 07:04
mlRe: Guidance for Cocoa's steep learning curve John Terranova May 16, 07:32
mlRe: Guidance for Cocoa's steep learning curve Ilan Volow May 16, 08:55
mlRE: Guidance for Cocoa's steep learning curve john darnell May 16, 15:30
mlRe: Guidance for Cocoa's steep learning curve Michael Ash May 16, 15:49
mlRe: Guidance for Cocoa's steep learning curve I. Savant May 16, 15:57
mlRE: Guidance for Cocoa's steep learning curve john darnell May 16, 16:19
mlRe: Guidance for Cocoa's steep learning curve I. Savant May 16, 16:27
mlRe: Guidance for Cocoa's steep learning curve Jeff LaMarche May 16, 16:29
mlRe: Guidance for Cocoa's steep learning curve Michael Ash May 16, 16:31
mlRe: Guidance for Cocoa's steep learning curve Jens Alfke May 16, 16:50
mlRE: Guidance for Cocoa's steep learning curve john darnell May 16, 16:57
mlRe: Guidance for Cocoa's steep learning curve I. Savant May 16, 17:04
mlRe: Guidance for Cocoa's steep learning curve Michael Vannorsdel May 16, 17:41
mlRe: Guidance for Cocoa's steep learning curve Andy Lee May 16, 20:05
mlRe: Guidance for Cocoa's steep learning curve Scott Ribe May 16, 20:22
mlRe: Guidance for Cocoa's steep learning curve Shawn Erickson May 16, 21:51
mlRe: Guidance for Cocoa's steep learning curve Michael Ash May 17, 08:56
mlRe: Guidance for Cocoa's steep learning curve Torsten Curdt May 17, 11:53
mlRe: Guidance for Cocoa's steep learning curve Michael Ash May 17, 12:02
mlRe: Guidance for Cocoa's steep learning curve Torsten Curdt May 17, 12:46
mlRE: Guidance for Cocoa's steep learning curve john darnell May 19, 15:26
mlRe: Guidance for Cocoa's steep learning curve David Casseres May 22, 05:59
mlRe: Guidance for Cocoa's steep learning curve David Casseres May 22, 06:12