Re: obj-c functions versus class methods
Re: obj-c functions versus class methods
- Subject: Re: obj-c functions versus class methods
- From: Shawn Erickson <email@hidden>
- Date: Wed, 10 Mar 2004 15:16:20 -0800
On Mar 10, 2004, at 2:52 PM, Kaelin Colclasure wrote:
On Mar 10, 2004, at 1:55 PM, Mark Eissler wrote:
Every now and then you're cruising right along and then all of a
sudden massive confusion sets in! It all seemed so clear just moments
ago and now? now(!) What was I thinking?? I hate it when this
happens...
In the grand scheme of things, what is the practical difference
between implementing functionality in a plain C function versus an
obj-c class method? Don't they accomplish the exact same thing except
the latter associates the functionality very specifically with a
particular group of functionality?
Class methods are inherited by, and may be overridden by, subclasses.
Also, since they're dispatched dynamically, they can be intercepted by
poseAsClass, etc. where a POC (plain-old C) function cannot.
Additionally they live in the name of the class not in a global
namespace.
- Shawn
_______________________________________________
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.