.Net Framework 编程语言
是否建议使用 C++/CLI 作为新的 .Net 应用程序的主要语言?该应用程序不会使用本机代码(纯 CLI)。这个问题的原因是,我想使用框架,但不想学习 C# 或 VB 这样的新语言。
斯特凡
Is it recommendable to use C++/CLI as main language for a new .Net application? The application won't use native code (pure CLI). The reason for this question is, that I want to use the framwork but not leaning a new language like C# or VB.
Stefan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
无论如何,您都会学习一门新语言,托管 C++ 与 C++ 完全不同。我会选择 C#,它与托管 C++ 一样接近 C++,只是它的冗长程度要少得多,并且具有更多功能(自动实现的属性、自动实现的迭代器、lambda 表达式等)。
You would be learning a new language anyway, managed C++ is nothing like C++. I would just go with C#, it's as close to C++ as managed C++ is, only it's a lot less verbose and has a ton more features (auto implemented properties, auto implemented iterators, lambda expressions etc).
C++/CLI 专为互操作场景而设计。
强烈建议您使用C#进行新开发;会简单很多。
你不应该害怕学习一门新语言。 C# 的大部分学习曲线都是针对 .Net 本身的;使用 C++/CLI 不会节省你太多的学习时间。
C++/CLI is designed for interop scenarios.
It is strongly recommended that you use C# for new development; it will be much simpler.
You should not be afraid of learning a new language. Most of C#'s learning curve is for .Net itself; using C++/CLI won't save you much learning.
它不是。微软停止了该语言的开发,处于维护模式。自 2005 年以来,C# 和 VB.NET 中的任何创新都没有添加到该语言中,其中最重要的是 Linq 和动态调度。虽然 IDE 支持本来就很弱,但 VS2010 发布时却没有对该语言的 IntelliSense 支持,这是棺材上的又一个钉子。
它将得到维护,该语言仍然是 .NET 框架部分的核心。值得注意的是 System.Data 和 WPF 严重依赖它。它仍然是困难的本机互操作的主要选择。但由于缺乏 IDE 的支持,它不适合作为首选语言。顺便说一句,对于从 C++ Express 版本开始的程序员来说这是一个问题,该 SKU 中没有其他像样的 GUI 编程解决方案。
It is not. Microsoft stopped development on the language, it is in maintenance mode. None of the innovations made in C# and VB.NET since 2005 were added to the language, Linq and dynamic dispatch being the heavy ones. While IDE support was already weak, VS2010 shipped without IntelliSense support for the language, another nail in the coffin.
It is going to be maintained, the language is still core to parts of the .NET framework. Notably System.Data and WPF heavily rely on it. And it is still the primary choice for difficult native interop. But with the lack of support in the IDE, it just isn't suitable as a first-choice language. Rather a problem for programmers that get their start with the Express edition of C++ btw, there is no other decent GUI programming solution in that SKU.