It's super-easy to use to make object-oriented wrappers around vanilla-C libraries, compared to C++, and b/c Objective-C is conceptually simpler than C++ there's fewer ways to shoot yourself in the foot.
There's not much point using it for new development unless your project is very self-contained or you're targeting Mac OS X or the iphone; moreover, Apple's pushed out Objective-C 2.0 recently, and are in the driver's seat for the language's future.
Personally, I prefer Java for the kinds of products Objective-C is supposed to be used for (desktop/mobile software). The tradeoffs:
- objective-c is lighter-weight and very simple to code in; Java is a lot clunkier and tedious to write; winner: obj-c
- java has a huge set of support infrastructure and tooling; obj-c has xcode (which is ok, but not great); winner: java
- java has generics that're mostly type-safe; obj-c doesn't really have any equivalent. I like type-safety when I can get it, so winner is java.
If you're learning objective-c to do Cocoa or UIKit development, you will spend much more time learning your way around Cocoa and/or UIKit than learning Objective-C; objective-c is like a week at the absolute longest, but Cocoa takes months to learn.
The first commandment of Cocoa: always respect convention; there's lots of semi-documented conventions (in terms of naming methods and arguments and ivars and so forth), and you should follow any conventions you see unless you understand what you give up by not following that particular convention.
There are two golden rules for Cocoa:
rule 1: if you're coding up something that seems like something any realistic application would have to include, you should take another look @ the docs b/c apple probably gave it to you already.
rule 2: a lot of functionality you'd expect to be in utility classes is buried in base classes (like NSObject, NSArray, NSDate, etc.).
If you have programming experience, you should be able to learn 99% of Objective-C in about 5 hours.
The flagship books of the series would be for Java and PHP, marketed to people that otherwise abhor those languages, but have to whip them out for the requirements of a specific project.
The syntax for calling methods is from Smalltalk, BTW. It's just different. It makes the method names document the arguments.
If you are put off by the syntax, then you are placing a lot of meaning in the arbitrary weight of your existing habits.
I would say it's a hell of a lot better than C. But kind of irritating compared to Java or Ruby.
If ever in Cocoa you think to yourself "man, this API is really awkward", Google it, you might find that you're not using it right. It certainly worked for me.
The pointers aren't such a big deal, as long as you don't try to use the math operators on them. You just have to remember the "*" in declarations. Remember, objects in most dynamic languages are "pointers", you just don't have access to the raw bits.
BTW, Objective-J solves the problems you mentioned (no raw pointer access, no header files or needing to declare things multiple times, the "+" operator does string concatenation and regexes are built in). Of course it's mostly for client side web apps, rather than native apps (though Cappuccino works in Adobe AIR...)
Any time I sit and think about how something is done in Objective-C, it doesn't take long to work out how I'd implement it and C and most of the time I can be pretty close (or quickly find), how various bits of "magic" are accomplished.
I don't like the overloaded dot operator added in 2.0, and have yet to hear a good reason for its inclusion (attracting developers used to using dots is not a good reason, imho; reducing the number of nested braces is better, but still unnecessary). I could do without garbage collection. Reference counting really isn't that hard.
The other features (namely properties and fast enumeration) are nice additions to the language.
(edit: multiple ideas, one poorly written sentence)
Reference counting isn't that hard, but garbage collection is superior. I used to fall into the same camp as you, but prolonged experience to Objective-J and then going back to Objective-C, I realized that even though I knew how to solve the problems, they weren't worth wasting cycles in my thought processes. All that to say, reference counting works really well, but there's no good argument not to just use garbage collection (at least 99% of the time).
It looks weird to a C programmer, but it reduces ambiguity once you move up the learning curve.
I've used a kind of reference-counted pointer in C++, but it'll fail if the reference graph isn't basically a DAG, (e.g. if you have some kind of circular reference). Do garbage collectors catch this when reference counting won't?
I didn't like it too much at first (funky syntax, different naming conventions, generally crappy string manipulation), but once I started using it, especially in conjunction with cocoa and ib, I really started liking it.
It has some cool perks, like using '+' (I forget the technical term) to add functionality to an existing class (i.e. adding a method to the NSString class by creating an NSString+Additions.m file, and all classes in your project can call that method on any NSString object). Much easier than having to create an NSString subclass just to add one method, and then having to remember to name all your NSString's something like MyString* str;
I also like that I can just throw a chunk of c or c++ code in there, and call it as a method. Kinda like having native JNI (department of redundancy department). Alright that was a really bad analogy...
Xcode is a decent SDK as well.
If you want OOP, slapping it on top of assembly language isn't a great idea. Use CL or Smalltalk instead; or any of the dynamic languages. Those are much closer to being good than anything in the C family.
Check out MacRuby, which is Ruby implemented on top of the Objective-C runtime: http://www.macruby.org/
The key difference between this and other "bridges" is Ruby classes are implemented as Objective-C classes. This couldn't have been done if Objective-C weren't as dynamic as it is. Objective-C is basically Ruby in C's clothing (which leads to a very different "feel", but in terms of "dynamicism" they're approximately the same).
The implementation language of the compiler is completely irrelevant.
I see your point about OOP, by the way: I don't think I really got C until I learned assembly language, and then it all fell into place.
Looking only at language aesthetics, Lisp/Smalltalk are excellent at OOP. We now have the benefit of computers that are insanely fast by the standards of the history of computing.
Go back a decade, and you want to get the best performance for a system by taking that awareness of the underlying assembly code. If you're dealing with pointers and structs then you can write sections of your program that you know will convert to a handful of assembly instructions.
You do have a point: trying to do OOP in a fancy version of assembly language is not going to be as seamless as a language with different core concepts. There are some ugly weld marks in C++ and ObjC, although I have come to appreciate the ObjC design approach after some time with it.
I just think it is meaningless to talk about good or bad languages without reference to the goals of the programmer.
It's not a bad problem to solve and Objective-C does a nice job. The syntax is odd, but it's to clearly separate the Objective-C parts from the C parts.
C++ on the other hand mushes the syntax together. It might look more C-esque, but it's less dynamic and more difficult to maintain as your project grows, IMO.
Plus XCode is awesome.
Obj-C, unlike C++, is a strict superset of C. All C code works in Obj-C (bar the new keywords), unlike with C++. I really think you're missing the point here. Apart from the controversial syntax, Objective-C's elegance sets it apart from C++ more than anything else. Objects and classes are really C structs. It's all introspectable, and it's all admirably simple (2.0 additions aside).
C++ is a convoluted, over-wrought solution to a problem which Objective-C solved with minimal additions to C. And Cocoa is leagues ahead of anything you have in C++.
The second problem is that cocoa touch is very async. By contrast windows forms is very synchronized - when you create a form and pass control to it, control does not return until that form closes, and then result is returned. Even a cavement can understand that. In cocoa/touch you pass control to a form, and then it returns and then you have to return it as well before the form is drawn. If you do something like closing a form in the event where you are supposed to re-draw the form the system blows up on you. If you set background from one callback it goes into infinite requirsion. There is no way to tell upfront - you have to try. It's very unintuitive that way and hard to wrap your head around it.
I'm sure a bunch of c00l haxors will tell you that they have no problem using it and therefore nobody else should have problems, but hey - some people can ride unicile, doesn't make it a good transporation choice.
I care very much about this group of people - they may not be wizards and ninjas, but they can certainly provide for a lot of needs out there.
I haven't really used it, though, it is just the impression I took away from glancing at the tutorials and listening to the beginnings of the iPhone tech talk.
(That was my experience.)
I don't remember much, just that it was a nice language, well fitting for the problem domain. It seems meanwhile they also added Java and C++ support.
Off-topic, but if you are interested in frameworks like this, also check out the MASON Multiagent Simulation Toolkit (which is based in Java):
i went from writing a lot of python to writing obj-c so the transition to a strongly typed, compiled-and-linked language was a bit frustrating. not surprisingly its not as fluid a language as python..... but you get used to it