• 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: Keyword @defs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyword @defs


  • Subject: Re: Keyword @defs
  • From: Dennis Munsie <email@hidden>
  • Date: Mon, 30 Nov 2009 15:50:26 -0500

Not that I'm advocating it, but you can also declare a field as @public to
allow you to access it via the -> operator.  Of course, I could be missing
some compiler magic going on behind the scene as well, and it may not
actually be the same speed wise as @defs was.

Not to mention that it's just plain nasty :)

dennis

On Sun, Nov 29, 2009 at 8:54 PM, Bill Bumgarner <email@hidden> wrote:

>
> On Nov 29, 2009, at 4:21 PM, Oftenwrong Soong wrote:
>
> > What exactly is this @defs keyword supposed to do?
>
> It effectively turned an Objective-C class declaration into a standard C
> structure such that you could access the instance variables directly via a
> simple -> operator.   Was mostly used for speed of access when working with
> poorly architected classes. ;)
>
> It has been deprecated in 32 bit and removed entirely in the modern ABI [64
> bit and iPhone OS] because it, obviously, totally and completely destroys
> encapsulation.  It also makes it impossible to implement non-fragile iVars.
>
> b.bum
>
> _______________________________________________
>
> 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
>



--
dennis
_______________________________________________

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: Keyword @defs
      • From: Bill Bumgarner <email@hidden>
References: 
 >Re: Keyword @defs (From: Oftenwrong Soong <email@hidden>)
 >Re: Keyword @defs (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: iterating and removing objects from a collection
  • Next by Date: Re: Keyword @defs
  • Previous by thread: Re: Keyword @defs
  • Next by thread: Re: Keyword @defs
  • Index(es):
    • Date
    • Thread