Re: Wrapping C functions in Objective C proxy objects: naming convention?
Re: Wrapping C functions in Objective C proxy objects: naming convention?
- Subject: Re: Wrapping C functions in Objective C proxy objects: naming convention?
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 20 Nov 2008 14:07:52 -0800
On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo
<email@hidden> wrote:
> Just my 2 cents, but it seems an abuse to turn functions into objects.
> Functions don't retain state; objects do. Objective C very gracefully allows
> objects to call C functions. If you're doing something like [calc
> addDoubleA:a withDoubleB:b], you've got a function masquerading as an
> object, which I think misses the entire point of OOP.
It is common, if not appropriate, to have utility classes (often ones
with just class methods) that provide "functions" for others to use.
At a minimum it allows you to namespace sets of utility methods.
-Shawn
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden