What are the differences between C++ and Objective-C, and which is the more powerful language?
All I know is that both languages are directly descended from C, with C++ grabbing stuff from an old OO language called Simula67 and Objective-C following Smalltalk's idea of OO.
They're very different approaches to OO. Most simply, everything in Objective-C is dynamic. C++ is static. When you invoke a method in C++, by default the code that is called is hardcoded in the resulting assembly. If you declare it virtual, a virtual table is set up for polymorphic runtime lookups. In Objective-C, if you send an object a message (the Smalltalk/Objective-C equivalent of invoking a method), it always goes through a table. This gives you some extra flexibility. For example, it's possible in Objective-C to create a method, if you will, that handles any method that isn't defined. Objective-C and Smalltalk are all about sending messages to objects, so it's a completely different thought paradigm.
Join our real-time social learning platform and learn together with your friends!