Re: Make Custom Struct Key-Value Coding Compliant
Re: Make Custom Struct Key-Value Coding Compliant
- Subject: Re: Make Custom Struct Key-Value Coding Compliant
- From: Kyle Sluder <email@hidden>
- Date: Sat, 11 Feb 2012 23:18:19 -0800
On Feb 11, 2012, at 10:56 PM, Graham Cox <email@hidden> wrote:
> Making it an object is easy and usually it turns out that the desire to resist doing that is misguided, based on some faulty assumptions. What are yours? If you need a scalar struct to pass to external code, just declare a method that will return that on demand, and a class method to make the object from the struct. Then any necessary conversion is also super-simple.
Also, as we transition toward ARC, we will need to switch to objects instead of structs containing pointers to objects. So it's better to just get in the habit of using objects throughout, whether it's NSDictionaries or custom NSObject subclasses.
--Kyle Sluder
_______________________________________________
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