Originally Posted by Brainless
Garbage collection on Mac is completely irrelevant to iPhone developers (at least for now). While manual memory management help SOME applications to have better performance (not all applications really have any problems with performance, mostly its some games), it is less productive for ALL applications to write them using manual MM. There are other areas of Obj-C where it really look ancient - separate .h files where you have to double the class definition, pointer arithmetics... and XCode is really bad IDE.
On the other hand Cocoa is pretty decent framework. Just wonder why every object starts with NS prefix. If they remove this, how many keystrokes of poor iPhone developers would be saved ? Billions ?
To your points:
1. separate declaration
Your right this bothers and I think the IDE could automate or synchronize this.
But it's not an problem that really hurts productivity when you get used to it.
2. XCode is a bad IDE
I'm coming from other languages and systems and I totally disagree.
You will have to get used to it, but it supports the MVC concept in a pretty clear and structured way. I'm used to IDE's with a higher UI integration and it's sometimes hard to get used to it, but I think there are some advantages in getting the code and structured like this when it comes to bigger projects and clean design.
Calling it bad is your personal opinion. I think it's just the result of a different philosophy we have to get used to.
Part of that philosophy is optimization. There are tools like shark and instruments that make it possible to get the "best" out of your code.
You might not worry about this, because your projects do not need this performance tweaks, but for me it was one of the main reasons to begin to learn Objective-C. I think techniques like CLang, LLVM, GCD and OpenCL are all about efficiency. To be honest I'm not sure if my old brain can handle this, but it's a clear vision of high "code-efficiency" for the next years.
If you prefer the more integrated way that's fine. But in this case I think Visual Studio and .Net are the benchmark.
It's obvious that pointers can lead to buffer-overflows, memory-leaks and memory fragmentation. Even experienced developers run into this troubles.
It's the price for some advantages like more efficient and dynamic memory management. E.g. You can sort elements in a List without having to create new copies.
When you call a function without to have to provide the variable and you can point to a known variable in order to avoid to allocate multiple memory copies.
As far as I know Java is internally working with pointers, but "hides" them.
Not sure if it's possible, but if Apple would find a way to define a similar "auto-pointer" (possible loss of efficiency) for those who need or want it. I'd like it.
4. The NS-Thing
Its historical (Next Step) and it's a common technique to add a prefix in order to mark classes as "mine" or "system".
May be it's possible to configure the IDE to hide/cut the NS-Prefix and append it at compile- or translation-time. This might cause a lot of trouble.
I'm a beginner. Until now I have the experience that using cocoa isn't about typing a lot of code. We would have to ask an experienced cocoa dev, but our billion keystrokes seem to be exaggerated.
5. Garbage Collection
Apple has got two years of experience with it from the Mac. Hard to say how big the memory or performance penalty would be, but I'd be pleased to see it in iPhone SDK 4.