. NET with CTS,CLS,CIL,CLR and C #

Source: Internet
Author: User

Origin:

. The origin of net technology can be said to be a most basic point of view, code reuse.

How to reuse:

The former reuse method is the class library, the use of a good class library is very enjoyable, but the reality is often frustrating, because the class library is binding to the language, each language has its own class library, such as JS want to use STL unordered_map, or other C + + library, need to implement with C + + Between the calls to each other.

How to make JS convenient to call C + + class library? Microsoft gave two answers to both COM and. NET.

COM is not discussed here, its implementation principle is based on the physical level, too complex, despite the mfc,atl, is still very complex.

So. NET, very simple, do a compiler, the JS code compiled into C + + code Bai!

The idea has, reasonable:

Yes, compiling the JS code into C + + code needs to solve some problems:

The first is the type of variable, the type of the system are different how to do?

The second is the language itself, the explanatory language into a compiler language, every time you write JS code to compile two times it?

Microsoft has also given the corresponding solution:

Type system is inconsistent, then unified chant, since we want to support a variety of languages, it is called the Universal type System (CTS) it.

What about the language problem, everyone thinks their favorite language is the best, in order to discuss what language better everyone will often discuss the agitatedly. It's a whole new language, and it doesn't have to be another big discussion in the IT world, and since we want to support a variety of languages, it's called Universal Intermediate Language (CIL) .

And almost anything:

Oh, by the way, what about compiling the code into CIL specification for each compiler author? Now that we can support a variety of languages, it's called the Common Language definition (CLS) .

One last question:

Our starting point is to solve the reuse problem, OK now everyone will be compiled to CIL, we just need to write a basic library for CIL, if we can support a variety of languages, it is called the Common Language Runtime (CLR) . The rest of the story is the compiler author, javascript.net,vb.net ...

Where is C #:

. NET origin of the story we finished, after all, this is a new system, the previous language writing or implementation may be some discrepancy (at least uncomfortable), so Microsoft released C #.

PostScript: Understand things often need to understand the context of things and the core, reuse can be said it technology forever pursuit, from the development line of Microsoft can be seen, C api-->mfc-->com-->.net, are for better reuse.

. NET with CTS,CLS,CIL,CLR and C #

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.