Re: difference between a method and function?
Re: difference between a method and function?
- Subject: Re: difference between a method and function?
- From: Ben Dougall <email@hidden>
- Date: Mon, 25 Aug 2003 14:32:40 +0100
On Sunday, August 24, 2003, at 10:52 pm, Alastair J.Houghton wrote:
2. Functions
+ Calls are slightly faster (unless you use an IMP).
that's what i suspected
- Don't have access to object member variables (unless written within
the bounds of an @implementation clause, in which case they still
don't have direct access [they need a pointer to the object]).
that's what i've just found out (a not accessible variable even though
it's declared in the implementation so is accessible to all methods but
not functions - needs variables passing to it)
i'm parsing data and keep needing to do the same things, like skipping
the white space (which isn't the same white space as c defines) for
example. at the moment i just repeat the 2 lines that do that. seems
like over kill to make a skip white space method, and a function felt
(without actually knowing, hence this question) more appropriate. looks
like a function is more appropriate, apart from its blindness to global
(within the object) variables.
thanks for the info.
_______________________________________________
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.