

Ask HN: What is the consensus on Objective-C and Cocoa? - sendos

On HN, I see lots of discussions on Apple and the iPhone and lots of discussions on languages such as Lisp, Ruby, Python, Haskell, etc, but I don't recall seeing much discussion on Objective-C and Cocoa.<p>Some languages seem to be widely praised (e.g. Lisp) while others are widely derided (e.g. Javascript).<p>In your opinion, where do the Objective-C language and the Cocoa programming environment fit in the spectrum of good-vs-bad computer languages or programming environments?<p>Personally, I'm new to both, and I find the combination to be too verbose, and too manual-labor-intensive. Also, there's too many classes and objects and delegates and view controllers to do simple things, e.g. just to get a simple table view up and running. And, it forces you to repeat yourself a lot, for example, to declare a member of a class for which you need an accessor method, e.g. NSString *str, you need to add it in three (!) places: add it to the class declaration, add a @property statement, and add a @synthesize statement. Not a fan so far.<p>Since I'm new to these, I wanted to see what veteran programmers have to say. Is there a consensus about how good/bad they are versus other programming languages and programming environments?
======
amock
I think Objective-C is a great extension to C, much better than C++. It does
sometimes involve more typing that I would like, but it's very simple and
straightforward. Message passing is very powerful and is what makes me like
Objective-C much more than the more widely used object-oriented languages like
C++ and Java. The biggest complaint I've heard about Objective-C other than
people who just don't like its syntax is that on iOS you can't use garbage
collection. However, using retain and release to do manual reference counting
is pretty easy if you just follow the rules.

As far as desktop programming frameworks go, Cocoa is by far my favorite. I've
used WPF, Qt, and various Java libraries but none of them come close to the
ease of use of Cocoa. Cocoa seems much more well thought out so while it does
have a lot of classes to learn, once you understand how a few work you can
easily use the rest. It also has classes for almost anything you would want
from a framework. It sometimes requires more setup for very simple apps than
other frameworks, but once you start building real applications you can see
the benefits of that extra initial work.

~~~
sendos
Thanks for the info. I should have noted in my initial post that I come from a
C++ background (have been using it for more than 10 years) and I do strongly
prefer C++ syntax.

