Re: mental crutch for class vs instance methods
Re: mental crutch for class vs instance methods
- Subject: Re: mental crutch for class vs instance methods
- From: Caleb Strockbine <email@hidden>
- Date: Tue, 27 Apr 2004 08:53:28 -0700
Wolf wrote:
>
Anyone have any bright ideas for a mental crutch for newbies learning
>
that "plus methods" are class methods and "minus methods" are instance
>
methods? I learned by rote memorization, but perhaps there's a trick I
>
missed.
How about this:
+ is more than -
You can only call -instance methods when you've created an object, but
you can call +class methods anytime. Therefore, you can call +class methods
in more situations than you can call -instance methods.
Personally, I just learned that +methods are like static member functions in
C++, and -methods are like regular (i.e. non-static) member functions.
Caleb Strockbine
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.