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 <b...@mac.com> 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 (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:
> http://lists.apple.com/mailman/options/cocoa-dev/dmunsie%40gmail.com
>
> This email sent to dmun...@gmail.com
>



-- 
dennis
_______________________________________________

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

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

Reply via email to