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 09/08/2006, at 7:43 AM, Dietmar Planitzer wrote:
Support for automatic garbage collection. The gcc man page that comes with Xcode 2.2+ has a description of how this feature can be enabled and how it basically works.

I don't really get this interest in garbage collection... the autorelease pools take care of temporary variables, and accessors take care of the longer term. Is GC being thrown in as a sop for the buzzword programmers? ("Oh my God, I can't program without polymorphic multiple inheritance abstract virtual base classes!")


The improvement for automatically creating accessor methods (via method attributes?) looks good, though I'm still a little leery about Key Value Coding violating encapsulation, and that trend seems to be accelerating with Core Data's objects not having prefixes in the global namespace.

Eg, this is something that bothers me... using GDB on some random view object reveals instance variables with names like:

_frame, _bounds, _window, _gState, _frameMatrix, _drawMatrix, _dragTypes, _vFlags

What if this object were KVC compliant, or a Core Data object, and I retrieved a variable that matched one of the above names? What if my Core Data object had a variable conflicting with one of the above names?

One of the improvements I'd like to see is for Apple to put a prefix on its instance variables so that they do NOT reserve that _naming for themselves!

--
  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>)
 >Re: Objective-C 2.0 (From: Dietmar Planitzer <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.