• 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: multiple inheritance equivalent in Core Data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple inheritance equivalent in Core Data?


  • Subject: Re: multiple inheritance equivalent in Core Data?
  • From: Bob Ippolito <email@hidden>
  • Date: Mon, 9 May 2005 14:09:56 -0400


On May 9, 2005, at 12:48 PM, glenn andreas wrote:


On May 9, 2005, at 11:40 AM, John Timmer wrote:


I don't have Tiger yet and haven't looked at CoreData much but I hope
that won't matter much. Under Panther I would use protocols to
encapsulate these behaviors because a class can conform to multiple
protocols.



To be more clear, in every place I said "keys", you could read "instance
variables". My understanding is that neither protocols or categories can
add instance variables to a class, so that neither of these would work for
this situation.




If you always access instance variables via accessors, categories can add them to a class (by maintaining the state in a separate data structure).


Consider "retainCount" as an example.

The question really sounds like premature optimization though. I wouldn't care whether CoreData wants me to have an extra ivar or two. God forbid those extra few bytes are wasted per instance, when there's a chance it might not even matter since allocations are vector aligned :)


-bob

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: multiple inheritance equivalent in Core Data?
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: multiple inheritance equivalent in Core Data? (From: John Timmer <email@hidden>)
 >Re: multiple inheritance equivalent in Core Data? (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: Really remote debugging
  • Next by Date: Re: Really remote debugging
  • Previous by thread: Re: multiple inheritance equivalent in Core Data?
  • Next by thread: Re: multiple inheritance equivalent in Core Data?
  • Index(es):
    • Date
    • Thread