On Thu, Feb 24, 2011 at 4:31 PM, James Bucanek <subscri...@gloaming.com> wrote:
> (3) Using an auxiliary structure to contain all of the implementation
> variables is a good alternative, but it has other drawbacks. First, it
> seriously pollutes all of the implementation code with pointer redirection
> through the ivar struct pointer, which I find both annoying and difficult to
> migrate later.

It occurs to me that the drawbacks to that approach don't have to be
so bad. Limit yourself to only using accessors for those ivars in the
structure, and make macros to let you define each getter and setter as
a one-liner in your implementation, and that should take care of most
of it.

I'd also like to toss in a sixth option: Tell Xcode to compile *all*
your code in Objective-C++ mode! I remember doing this on a large
project several years ago, and apart from the fact that compilation
was a lot slower, I don't remember having any other problems with this
approach.

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to