Colon Class § 6.2: Platform language

Source: Internet
Author: User
Tags garbage collection

6.2 Platform Language--first after the Taiwan opera

Great wisdom is not to be taken into account--"Xun Zi-Tian's treatise"

Keywords: platform language, java,c#,c++

Summary: Brief talk Java and C #

! Preview

Java is designed to allow a language to run on a variety of platforms, and C # is designed to allow multiple languages to run on one platform

Two platform languages (Java and C #), one in language, the language to the platform diffusion; a platform for the platform to condense the language

C + + provides a Yimapingchuan road, but also provides a trap-covered trail, while Java is laying cement on the road while blocking shortcuts; C # also filled the bumps on the road, but quietly replaced the "blocked" sign on some trails with "this dangerous road."

? Questions

What improvements have Java and C # made on the basis of C + +?

What is the difference between Java and C # in the design philosophy?

How does Java and C # learn from each other?

Why is Java and C # good at Enterprise application development? Can they be used as a system development language?

: Explain

The comma says: "Now it's time to go to Java." ”

Colon: "The focus of the following is shifted from the system language to platform language--java and C #." ”

The question mark hears confused: "Platform language?" Is Java not a platform-independent language? ”

"Platform is very meaningful, can be a hardware platform, can be software platform, can also be a combination of the two." The colon explains, "platform," you mean the hardware and operating system platform, and I say ' platform ' refers to the operating environment platform. Of course, the two platforms are inseparable, Java and C # can be independent of the previous platform, just because they brought the latter platform. Specifically, Java runs on a Java platform with the Java Virtual Machine (JVM) as its core, while C # runs on the. NET platform at the core of common Language Runtime (CLR). ”

"It's like laying the same asphalt on a different mountain path, and it doesn't make any difference where the car runs," he said. ”

"It's such a reason. "The colon says yes," from the perspective of inheritance, both are based on C + + improvements, eliminating the grammatical features that are prone to error or are not easily mastered. Let's take a look at what they are different from C + + in common. First, both are compiled into machine-independent managed code (managed code) or byte-code (bytecode), running on top of the virtual machine machine. Second, disabling or restricting pointers and supporting automatic garbage collection have greatly freed programmers from productivity. Initially this approach is not uncontroversial, but with the improvement of machine performance and the expansion of software scale, the robustness, security and productivity requirements of the software exceed the requirements for operational efficiency, and the shield pointer and automatic memory management are gradually recognized. However, pointer operations and manual memory management are essential for system software and for software that requires extremely high performance and timeliness. For this reason, C # has left one hand: Allow code with modifier unsafe to contain pointer operations. ”

The quotes are more real: "Does this mean that C # can also be used as a system language?" ”

"Maybe," he said. "The colon is faint to say," C # 's appetite is very big, on the Tube day, under the tube, the middle also wants to tube the air. Enterprise applications and desktop applications do not need to say, the bottom of the application is not spared. As early as 2003, Microsoft Research began to use C # developed by the singularity of the operating system study project, in addition to SharpOS, Cosmos and other open source operating system. Although they are currently used only for research, it is not hard to see the ambitions of C #. This is also not new, 1998 sun on the embedded system for the Javaos, unfortunately failed to succeed, the Java me to replace. ”

Turn to the exclamation mark confused: "Just said Java and C # is platform language, how and C and C + + when the system language to use it?" ”

Colon explanation: "Java can invoke the C, C + + programs through JNI, C # through P/invoke access to the system API, plus the retention of pointer operations, for system programming more convenient." In fact, a language competent in a variety of areas is not difficult, difficult is in every field is the top. But the question is, who is not happy to see that the language they support is widely used? Whether it is Microsoft or sun, they will do their best to expand their language to every corner. Programmers as a language users, although many times do not have the right to choose the language, but the heart to have Steelyard, can not easily be confused by the advertising business ads AH. ”

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.