Is Visual C ++. NET really limited by limitations?

Source: Internet
Author: User

Microsoft will introduce the C ++ language. NET environment, first from the perspective of style, the use of Visual C ++. the code developed by. NET may have both MFC, ATL, standard C ++, and ,.. NET managed code and other different styles, which greatly facilitates Visual C ++. NET developers.

Among them, it has the greatest impact on the C ++ language itself. Of course, it takes some fresh blood for Visual C ++. NET hosting code to inject C ++:

 
 
  1. #using   
  2.  
  3. using namespace System;  
  4. using namespace System::Reflection;  
  5. using namespace System::Security::Permissions;  
  6.  
  7. public __value enum SomeStuff {  
  8.     e1 = 1,  
  9.     e17 = 17  
  10. };  
  11.  
  12. [attribute(AttributeTargets::Class, AllowMultiple=true)]  
  13. public __gc class ABC {  
  14. public:  
  15.     ABC(int __gc[]) {}  
  16.     ABC() {}  
  17.     ABC(int) {}  
  18.     ABC(int, float) {}  
  19.     ABC(SomeStuff) {}  
  20.     ABC(String*) {}  
  21.     int rgnField __gc [];  
  22.     double rgdField __gc [];  
  23.     double dField;  
  24. }; 


The above Code comes from the sample program in MSDN. The new features and new technologies such as garbage collection and Attribute attributes introduced by Microsoft for the C ++ language are displayed. the. NET hosted code is a novel and almost unconventional language style.

I don't know whether Microsoft should be excited for its efforts to develop the general language platform, or whether C ++ should gradually fall under the shadow of C # language. the supporting role in the NET drama was discouraged. Maybe, the language style and the programmer's feelings are not worth mentioning in Microsoft's eyes. How can they be compared with. NET's grand strategy and Microsoft's powerful empire?

The change in language style reflects the changing rules of technical thoughts and industrial needs from one aspect. Since Stroustrup completed the first Cpre Preprocessing Program in 1979, the C ++ language has been in this world for almost 25 years. This is a language that emerged, grew, and evolved in practice. Maybe Stroustrup didn't want to design a purely object-oriented language like Smalltalk from the very beginning.

The open, efficient, compatible, and scalable requirements make C ++ a typical multi-mode Multiparadigm language. Whether it is C ++'s early inheritance of the Simula language. Later, I learned from Smalltalk, Ada, Clu and other languages.

Whether it is the rapid popularization of ANSI/ISO standard style, or Visual C ++. NET's unremitting efforts in technological innovation, all these historical changes show that the diversity of C ++ in style mainly comes from the mind and spirit of the C ++ language itself.

  1. Introduction to C ++
  2. Summary Notes on learning and exploring C ++ library functions
  3. Basic Conception and method of C ++ Class Library Design
  4. Does C ++ really have market value?
  5. Basic Conception and method of C ++ Class Library Design

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.