What are the differences between objective-c and C + +?

Source: Internet
Author: User

the objective-c development language is an object-oriented programming language thatexpands C , which is used for IOS Developmentobjective-c Language , but recently Microsoft revealed Objective CNewTechnology, its latestIDE Visual Studiocan beobjective-ccode compilation runs onWindows Tenon. It is said that this technology canobjective-cthe code as much as possible intoJavaorC + +code that hooks into the native platformAPI. So is the same"C",objective-cand theC + +What's the difference between them?

   objective-c, usually writingOBJCand less-usedObjective Corobj-c, is to expandCObject-oriented programming language. It is mainly used inMac OS Xand theGNUstepthese two useOpenStepstandard system, while in theNeXTSTEPand theOpenStepIt is more of a basic language. objective-ccan be inGCCas wellClangto write and compile on the operating system becauseGCCwith theClangcontainingobjective-cthe compiler.

  objective-c is a very practical language. It is a C -written, very small runtime, only makes the size of the application small, and most of the OO system uses a large number of VMS The execution time will replace the whole system's operation instead.

( ) also and smalltalk

So, theoretically,objective-c It is fully compatible with the standard C language; In contrast, C Language compatibility is mainly manifested in the syntax,objective-c on this basis, added the object-oriented programming language features and Smalltalk message mechanism.

Unlike C + + ,objective-c does not support operator overloading.

as in Java,objective-c only allows objects to inherit one category ( without multiple inheritance ). This is also different from C + + .

  objective-c multiple inheritance is not supported, and C + + The language supports multiple inheritance.

  objective-c is dynamic training ( dynamicaly typed) so it's class cubby C + + easy to operate. objective-c can allow access to methods and classes based on string names at run time, and can also dynamically connect and add classes.

In C + + , the static type of an object determines whether you can send a message to it, and for objective-c , it is determined by the dynamic type.


What are the differences between objective-c and C + +?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.