Managed extension C ++ migrate to C ++/CLI

Source: Internet
Author: User

For C ++/CLIRepresentativeISO-C ++One Dynamic Programming generic extension of standard language has many extensions in the original language design. We think that in the revised language design(V2)These vulnerabilities have been fixed. The following describes the learning study...

 

This document listsV1Features of the version LanguageV2If the corresponding function exists in the version), and points out that the corresponding function does not exist. For interested readers, you can refer to the appendix to provide the extended principle of the new language design. In addition, a source code-level Conversion Tool(Mscfront)Developing, and possiblyC ++/CLIIn the release versionV1The code is automatically transplanted to the person who designs the new language.

 

This article is divided into five chapters and an appendix. The first section discusses the main issues of language keywords, especially the removal of double underscores and context-related and keywords separated by spaces. Section 2 focuses on changes in hosting types-In particular, it is used to host reference types and arrays. You can also find the deterministic termination semantics here.Deterministic finalization. Changes to class members, such as attributes, index attributes, and operators, are the focus of section 3. Section 4 focuses onCLIEnumeration, Internal and pinned pointer syntax changes. It also discusses many significant semantic changes, such as the introduction of implicit packing,CLIEnumerationAndValueClass. Section 5 is a little like a hodgedge-Miscellaneous. The behavior and parameters of type conversion symbols and string characters are discussed.Array.

 

1.Language keywords

 

An important conversion from the original version to the revised version is to remove double underscores in all keywords. For example, an attribute is declaredPropertyInstead_ Property. The two main reasons for using the double-underline prefix in the original language design are:

 

1.

This is to provide conformityISO-C ++Standard local extension consistency method. One of the main objectives of the original language design is not to introduce incompatibility with standard languages, such as new keywords and tags. The reason is that it also promotes declarative hosting to a large extent.ReferenceTypeObject.

2.

In addition to compatibility, the use of double underscores is also a reasonable guarantee that it will not affect users with the old code base. This is the second major goal of the original language design.

 

In this case, why do we remove double underscores and introduce some new tags )? No, it does not mean that we will not consider being consistent with the standard!

 

We continue to work toward standards. However, we are aware thatCLIThe support of the dynamic object model shows a new and powerful programming model. Our experience in original language design, design and developmentC ++The experience of the language itself makes us convinced that the support for this new paradigm requires its own advanced keywords and tags. We want to provide a first-class expression of the new model, integrate it and support standard languages. We hope you will feel that the revised language design provides a first-class programming experience for these two completely different object models.

 

Similarly, we are very concerned with minimizing the impact of these new keywords on existing code. This is solved by keywords related to context and separated by spaces. Before we look at the revision of the actual language syntax, let's try to figure out the characteristics of these two special keywords.

 

A context-related keyword has a special meaning in a specific program context. For example, in a common program,SealedIs a common identifier. However, in a managedReference classType Declaration, which is a keyword in the context of the class declaration. This minimizes the potential impact of introducing a new keyword in the language. We believe that C ++/CLI is very important to users who already have a code base. At the same time, it allows users of new functions to experience first-class new language functions.-We believe that these factors are missing in the original language design. We will 2.1.2 SeeSealedUsage example.

  1. How to Write C ++ project development and project plan correctly
  2. Summary Notes on learning and exploring C ++ library functions
  3. In-depth demonstration of high security of C ++
  4. Describes in detail how to accurately Write C ++ languages.
  5. In-depth demonstration of high security of 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.