C++/CLI is the latest version of Microsoft Visual C++ under beta.
Let me explain the name first: C++ is the programming language we all should be already familiar with; CLI stands for Common Language Infrastructure, aka. .NET platform, the "/" in the middle means the integration of C++ with CLI. It now uses some new keywords for managed coding, such as: String^ str = gcnew String("");
Originally in .NET 1.0 or 1.1, when Microsoft announced Visual C++.NET, a term "Managed C++" was introduced. "Managed" means we can create object that can be automatically deallocated from memory by GC. Since Managed C++ sticks very loyal to ISO C++, the code looks quite ugly: full with "__gc" stuff. What's more, it only counts for a "second-class" language under .NET. Many "traditional" Visual C++ programmers chose to switch to C#, a first-class language coming with .NET, or to abandon .NET or Microsoft platform completely.
That's when the idea of a new sort of Visual C++ come into sight. Created by Stan Lippman and Herb Sutter, C++/CLI provides programmers the ultimate control in .NET environment with a very high level of access to .NET class libraries, while at the same time allows the most "traditional" way of C++ programming.
Does this sound pleasing or annoying to you? To me, this is really cool, and makes me feel the "comeback" of C++ to .NET. And this is somewhat the same approach (spirit?) taken by C++ geeks when they introduced C++ in the dominance of C.
[转自己的文章]C++/CLI, a savior or a devil?
最新推荐文章于 2025-12-02 21:05:32 发布
本文介绍了C++/CLI,它是微软Visual C++的最新测试版本,是C++与.NET平台(CLI)的集成。此前的Managed C++代码不美观且是.NET下的“二等语言”,很多程序员转用C#或放弃.NET。而C++/CLI让程序员在.NET环境有高度控制权,能以传统C++方式编程,仿佛C++回归.NET。

1074

被折叠的 条评论
为什么被折叠?



