1.

Differentiate Between Objective-c And C/c++?

Answer»

Objective-C:

  • In Objective-C, the method and the VARIABLE have to be of exactly the same name.
  • The message overloading is faked by naming a PARAMETER and we have to mangle the names MANUALLY.
  • Objective-C does not have REFERENCES.
  • In Objective-C, templates are not available.
  • For differentiating between class methods, Objective-C uses + and -.

C++:

  • In C++, the name of the method and the variable has to be different.
  • C++ does the same work but INSTEAD of doing it manually, the compiler does the name mangling for us.
  • C++ enjoys an advantage over Objective-C when it comes to references.
  • Templates are available in C++ because C++ has strong typing and static bidding.
  • For differentiating between class methods, C++ uses static to specify the factory method.

Objective-C:

C++:



Discussion

No Comment Found