A funny thing happened on the way to the bookstore...
I have been meaning to take up Cocoa/Mac/IOS programming several times; last November, I got within spitting distance and once again got diverted.
So here I was, heading off to my local book store this weekend to FINALLY buy SKochan's (3rd) edition Objective-C book. Fortunately, for me, the one copy in the store was a bit tattered, so I decided to buy it on Amazon. And what do I see? There's a *4th* addition coming out. And it's got a section on this stuff called "ARC." A few minutes of googling later, and I'm trying to decide if this is some elaborate April Fool's joke.
Objective-C without having to retain/release all over the place? Without autoreleasing? That's the major thing that's made me pause, so many times, before picking up this language. (I've been programming in C++ since 1985, so I'm a bit biased. And these days I'm having an elicit love affair with Python on the side. Don't tell me C++ code...)
Well, after two solid days of watching WWDC lectures, and reading all the notes, and seeing how LLVM is managing this it, I'm pretty impressed. This sounds fantastic!
But I'm left with a few questions:
1. Is the 4th edition of the book going to effectively teach the proper way to do things, in the sense that if ARC had always been there, and we never did retain/release, how different would the teaching of the language/frameworks be? Is the 4th edition have these topics as add-ons (understandable, if so -- it's not a criticism), or will it really teach me now how this language should be used now that ARC is there. (I feel that people who never ever had to use the frameworks pre-ARC may do things quite a bit differently than people who know retain/release liek the back of their hand, but are only now starting to use ARC...)
For example, blocks/properties/statements about atomicity: it seems like it's become a bit jumbled, with multiple ways to do things. I hope the ARC syntax is going to unify all this --- given that I'm starting from a blank slate, I want to know the *right* way to do all this going forward, without baggage from the past weighing me down...
2. I'm also trying to understand how STL might figure into this. I like the idea of programming in Objective-C++, and using C++ classes where appropriate. What if I use ARC on unit A, and not on unit B, so that the compiler can't see inside B, and suppose I pass a vector<__strong MyClass*> into B?
If B kept my vector, but returned me several copies of that same vector over time, how would the compiler guarantee that I didn't overrelease the objects? I know there's a convention on naming of functions that might give ARC a clue but does it apply to C++ syntax as well? (Waving my hands here -- feels like there's something here to worry about...)
3. Do I really have to wait until January for the 4th edition?
