What are the differences between C++ and Objective-C, and which is the more powerful language?
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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.