Re: Keyword @defs
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