Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Objective-C 2.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C 2.0




On Aug 8, 2006, at 7:39 AM, Greg Hurrell wrote:

El 07/08/2006, a las 22:09, Dietmar Planitzer escribió:

There are a ton of highly interesting things there. I like all of them - but my personal favorit is the AGC stuff.

Could you comment a bit more about that? What are some of the highly interesting things in there. I've looked at the CVS repository but I don't know enough to really interpret what's in there that's going to benefit me; from my perspective as an Objective-C user (not a compiler hacker)

While taking a quick glance at the diffs, this is what I see so far:

Line ~215: Real getters / setters (properties)
Line ~345: Method attributes (Woohoo!!!!!)
Line ~600: Weak references (Needed for GC)

Interesting things i found later on down in the sources...

it looks like getters and setters will be provided automatically if not user specified. This leads me to think (along with references in the code to a MetaClass object) that we may be getting true reflection capabilities like java / .net have.

The guts of the objects have changed. I wonder if this could cause link-time issues with older code? I don't know enough about compilers in general to be sure though, so take that with a grain of salt.

More references to strong / weak refs. All signs point to a full- blown GC, with an interesting comment in the code:
/* Return 1 if TYPE should be garbage collected, -1 if has __weak attribute
and 0 otherwise. Types marked with the '__strong' attribute are GC-able,
whereas those marked with __weak' are not. Types marked with neither
attribute are GC-able if (a) they are Objective-C pointer types or (b)
they are pointers to types that are themselves GC-able. */


So it appears (to me) that a full-blown GC which can collect any Obj- C type is possible. I've read speculation that there would be a separate pool type for GC objects, the last sentence of that comment seems to confirm that -- being able to reference GC'able objects from "standard" objects & vice-versa.

Now this is all speculation on my part from 10 minutes looking at the source, YMMV... but if it's true, then Obj-C will become my hands- down all-time favorite language -- All the Obj-C goodies we have already, with all the best parts of java and .net, and it's still compiled natively!! Wooooooooo!! :)

Jason



Cheers, Greg

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Objective-C 2.0 (From: "Philippe C.D. Robert" <email@hidden>)
 >Re: Objective-C 2.0 (From: Dietmar Planitzer <email@hidden>)
 >Re: Objective-C 2.0 (From: Greg Hurrell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.