-The Objective C class allows a method and a variable with the exact same name. In C++, they must be different.
-Objective C does not have a constructor or destructor, instead it has init and dealloc methods, which must be called explicitly.
-Objective C uses + and – to differentiate between factory and instance methods, C++ uses static to specify a factory method.
-Multiple inheritance is not allowed in Obj C, however we can use protocol to some extent.
-Obj C has runtime binding leading to dynamic linking.
-Obj C has got categories.
-Objective C has a work-around for method overloading, but none for operator overloading.
-Objective C also does not allow stack based objects. Each object must be a pointer to a block of memory.
-In Objective C the message overloading is faked by naming the parameters. C++ actually does the same thing but the compiler does the name mangling for us. In Objective C, we have to mangle the names manually.
-One of C++’s advantages and disadvantages is automatic type coercion.
-Another feature C++ has that is missing in Objective C is references. Because pointers can be used wherever a reference is used, there isn’t much need for references in general.
-Templates are another feature that C++ has that Objective C doesn’t. Templates are needed because C++ has strong typing and static binding that prevent generic classes, such as List and Array.
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
- The Objective C class allows a method and a variable with the exact same name. In C++, they must be different.
- Objective C does not have a constructor or destructor, instead it has init and dealloc methods, which must be called explicitly.
- Objective C uses + and – to differentiate between factory and instance methods, C++ uses static to specify a factory method.
- Multiple inheritance is not allowed in Obj C, however we can use protocol to some extent.
- Obj C has runtime binding leading to dynamic linking.
- Obj C has got categories.
- Objective C has a work-around for method overloading, but none for operator overloading.
- Objective C also does not allow stack based objects. Each object must be a pointer to a block of memory.
- In Objective C the message overloading is faked by naming the parameters. C++ actually does the same thing but the compiler does the name mangling for us. In Objective C, we have to mangle the names manually.
- One of C++’s advantages and disadvantages is automatic type coercion.
- Another feature C++ has that is missing in Objective C is references. Because pointers can be used wherever a reference is used, there isn’t much need for references in general.
- Templates are another feature that C++ has that Objective C doesn’t. Templates are needed because C++ has strong typing and static binding that prevent generic classes, such as List and Array.