Beyond C + + Next Generation C++:C++/CLI Introduction

Source: Internet
Author: User

First, the introduction

C + + programmers react differently when Microsoft introduced Vs.net7 to implement extensible managed C + +. Although most programmers are relieved to be able to continue using C + +, almost everyone suffers from the arcane syntax provided by managed C + +. Microsoft clearly sensed from feedback that managed C + + was not so successful.

October 6, 2003, ECMA (European Computer Manufacturers Association) announced the formation of a group of experts responsible for the integration of ISO standard C + + and the common language, the development of an extensible language standards, the new extensible language is called the C++/CLI standard. This standard will be supported by the vs.net2005 C + + compiler.

The problems existing in the old grammar

1, the obscure grammar and grammar-these two "double bottom line" problem increased the burden of reading.

2. Second-rate CLI Support-provides CLI support relative to the use of inconvenient workspaces with C # and vb.net,mc++, for example, it does not have a one by one corresponding structure to enumerate. NET of the collection.

3, C + + and. NET rough combination-for CLI types, you can not use the characteristics of C + +, such as templates; Similarly, for C + + types, you cannot use the features of the CLI, such as a fragment collection.

4, confusing pointers--unmanaged C + + pointers and managed reference pointers all use the * syntax, which is confusing because the-GC pointer is fundamentally different from the managed pointer in essence and behavior.

5, the MFC compiler can not produce verifiable code.

What does C++/CLI offer us?

1, elegant and fluent grammar and grammar--c++/cli provides a very natural feeling for C + + developers to write managed code, and it provides an excessive smoothness of unmanaged code to managed code. The previously so-called "double bottom line" problem has now vanished.

2. The first class CLI supports--CLI features such as attributes, fragmentation sets, and generic classes that are directly supported, and C++/CLI also allows these features to be used for local unmanaged classes.

3. Class C + + classes support--c++ features such as templates and destructors continue to be effective for drag and drop tube classes. In fact, C++/CLI is one that you can "ostensibly" declare on a stack or C + + local heap. NET-type unique. NET language.

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.