0

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

2
  • 2
    Very subjective : best to ask on programmers.stackexchange.com Commented Mar 6, 2011 at 19:01
  • C++/CLI has some advantages over C#, like templates and reference return types. But the big one is the ability to #include native headers. Commented Mar 7, 2011 at 1:30

3 Answers 3

7

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).

Sign up to request clarification or add additional context in comments.

2 Comments

Ok, then i will have a look at C#, does someone know's a good book or tutorial on it?
7

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.

Comments

3

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.

3 Comments

Aaah, this is useful to know. I have been wondering if I should be adding some C++/CLI study time in which is hard to manage with all the C# to learn. +1.
I don't think this is accurate. MS didn't implement anonymous methods in C++/CLI because they knew lambda syntax was being worked on by the C++ committee. Now we will get consistency between lambdas in ISO C++ and C++/CLI. That makes me much happier than if Microsoft had made their own syntax to keep parity with C#.
I don't think the observation that this answer talks about anonymous methods or lambdas is accurate.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.