News for hackers. Stuff that matters.
Re:The Unfamiliar (Objective-C & Cocoa) by wtallis on Monday September 19, 2011 @07:37PM (#3015641)
You have to understand the history in order to understand why there's a distinction. If it weren't for all the Java programmers who've tried to get rich off the App Store in the past several years, there wouldn't be much need for a distinction. However, too many of the Java programmers that have been jumping on the Objective-C bandwagon have never before had to give any consideration to memory management. Thus they had trouble learning to use the Cocoa manual explicit reference counting paradigm, which requires the application programmer to know where to make calls to -retain and -release.

This requirement that the application programmer participate in memory management contributes more to the distinction than the fact that the Cocoa reference counting scheme imposes less runtime overhead than most robust garbage collectors of the sort used by Java or Python.

The new Automatic Reference Counting used by Cocoa is still different from traditional garbage collectors, because it is implemented without imposing any more runtime overhead than the manual scheme. ARC is essentially a preprocessor phase that infers (based on coding conventions) where to place the calls to -retain and -release. None of the complex logic for tracking the lifetime of an object is done at runtime. It's done at compile time, if at all. (ARC differs from full-fledged robust garbage collectors like what Java has in that ARC can't handle situations like cycles in the object graph. Handling those cycles is one of the main things that makes writing a high-performance Java-like GC non-trivial, but ARC simply chooses to not be that automatic.)

Re:The Unfamiliar (Objective-C & Cocoa) by nknight on Monday September 19, 2011 @07:48PM (#3015682)
So I'm getting a ton of downvotes because I called an Apple-invented distinction an Apple-invented distinction?

Did I just step into the twilight zone?

Re:The Unfamiliar (Objective-C & Cocoa) by wtallis on Monday September 19, 2011 @09:41PM (#3015916)
Apple didn't invent the difference. It just wasn't that important until it applied to Apple. That difference, and the consequences of it, are one of the most important distinctions between Apple's mobile operating system and it's competitors. What ten years ago may have seemed like trivial academic pedantry may now be a significant competitive advantage or disadvantage in a lucrative market.