• 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: Wrapping C functions in Objective C proxy objects: naming convention?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrapping C functions in Objective C proxy objects: naming convention?


  • Subject: Re: Wrapping C functions in Objective C proxy objects: naming convention?
  • From: Jonathon Kuo <email@hidden>
  • Date: Thu, 20 Nov 2008 13:23:16 -0800

On Nov 19, 2008, at 9:27 PM, Austin Ziegler wrote:

For a project that I'm working on, I have a need to write a code
generator that will wrap certain kinds of C functions as Objective C
messages on an Objective C proxy. Because I don't ultimately control
the input, the parameters on the C functions may be poorly named. I'm
looking for advice on how one might make useful object message names
from C functions.

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.


_______________________________________________

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


  • Follow-Ups:
    • Re: Wrapping C functions in Objective C proxy objects: naming convention?
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Wrapping C functions in Objective C proxy objects: naming convention? (From: "Austin Ziegler" <email@hidden>)

  • Prev by Date: NSImageView and releasing it's images...
  • Next by Date: BAD_EXC_ACESS
  • Previous by thread: Re: Wrapping C functions in Objective C proxy objects: naming convention?
  • Next by thread: Re: Wrapping C functions in Objective C proxy objects: naming convention?
  • Index(es):
    • Date
    • Thread