Java + (c + +)!= C #

Source: Internet
Author: User
Tags functions inheritance
C++

In my impression that C # has been summed up in C + + based on the reference to the Java language design of a language;

Today carefully looked at the characteristics of C #, found that the understanding is biased;

For the sake of understanding, we divide a computer language into three parts.



The basic grammar;

Organization structure (object oriented);

specific functions;



U these three languages are very imaginative in the basic grammatical structure;

Üc# and Java in the object-oriented aspect is very similar, throw away the different keywords (inherited keywords, the final keywords, etc.);

N Type,

N Interface,

N Virtual class,

A single inheritance between n types,

n Multiple inheritance between interfaces,

Multiple implementations between n classes and interfaces

It can be said that C # is simply a copy of Java object-oriented features;

• special features; C # has made unremitting efforts to preserve the powerful functions of C + +, such as distinguishing the value calls of formal parameters, invoking calls, and so on; personal feeling in order to retain the function of pointers can provide C # made unremitting efforts; a delegate is actually a non-pointer implementation of a function pointer and adding support for events at the type level; you can see C # making a lot of changes;



Personally, C # is trying to integrate Java's simple feature-oriented and C + + powerful and flexible functions with the help of. NET base Class library and universal language runtime to achieve a perfect language;

But I feel like she's gone the way of C + +, the function is quite many, very strong; but there is no sense of focus; Java mastering Java is a pleasant thing, because its purpose is clear, there will not be too many people to mix Yao's function; C # has made unremitting efforts to maximize compatible C + + But I think he needs to be more concise than the Java language;



Allow users to perform certain functions by using them, rather than adding support for specific features at the language level;

C # A little sword walk slant!





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.