On Feb 11, 2012, at 11:56 PM, Graham Cox 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?


Geometry objects are slow which is why Cocoa has the likes of NSPoint, NSSize, 
and NSRect.

If I use an object then each managed object attribute would look something like 
this.

     1. Persistent Attribute (NSString so it is readable in the XML store)

     2. Transient Shadow Attribute (must be an object)

     3. Struct Obtained from the Shadow Attribute

It just seems so heavy. My app will be using the scalar accessors very 
frequently.

Karoly Lorentey has a blog entry "Efficient Scalar Attributes in Core Data" for 
iOS. I was trying to follow his lead except target Mac OS X v10.6 using a 
struct instead of a single scalar but it has been rough going.

     http://blog.lorentey.hu/2010/10/31/core-data-scalars/


On Feb 12, 2012, at 12:18 AM, Kyle Sluder wrote:

> 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.

My struct contains no pointers.


--Richard


_______________________________________________

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

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

Reply via email to