• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mental crutch for class vs instance methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: NSOpenPanel and JPG files
  • Next by Date: Is KVO really as complicated as I think?
  • Previous by thread: mental crutch for class vs instance methods
  • Next by thread: [OT] 'Loosing' threads in Mail
  • Index(es):
    • Date
    • Thread