tags:

views:

162

answers:

4

Hi,

Can you please tell me what are the advantages of objective c over c++? After reading objective c programming guide? i think c++ have the same if not similar features.

And why project like Webkit needs to use both c++ and objective c? My understanding is the Webkit common code is in c++ whereas the MacOS specified part is in objective c.

Thank you for any pointers.

+2  A: 

Well, If you are coding for the some platforms like the IPhone, Objective-C is required. Objective-C also uses dynamic(run-time) typing, which many people prefer over static(compile-time).

Nathaniel Flath
+5  A: 

Objective C's OO features use dynamic typing instead of static (compile-time) typing. That's the major difference in the approaches of the two languages - whether it's an advantage or not depends on your opinion about static vs. dynamic typing.

Daniel Earwicker
+1  A: 

WebKit was originally a C++ project (khtml from KDE) that was later adapted by Apple to be more compatible with the Cocoa-environment and thereby got its Objective-C layer.

suraken
+4  A: 

I find objective-c's syntax a little cleaner than c++'s although I know I'm in the minority here

ennuikiller
Yes, I'd say it's a lot cleaner. Not just a little. Like in, it can actually be parsed.
Stephan Eggermont