tags:

views:

192

answers:

4

So with Microsoft .NET, you get the advantage of language interoperability. But I've heard that this is slower than native applications. What if you only need one language? Then what are the advantages. I am a C and C++ programmer, and .net seems to be heavily tied with C#. Is this the case? And is dot net portable, or tied to windows?

And lastly, is .net worth taking a look at, from the perspective of a C++ programmer who doesn't need language interoperability?

Thankyou.

+3  A: 

Then what are the advantages ...

You get all the .NET classes.

Andreas Rejbrand
A: 

Language interoperability is one feature of .Net. It is far from the only feature in .Net. Don't forget things like advanced garbage collection, linq, improved api organization, and much more.

Joel Coehoorn
+2  A: 

'.NET is slow' is a misconception, along with 'Java is slow'. Yes, it used to be slower than native, and yes, you can get faster programs using hand-optimized assembly, but for nearly all cases short of core engine code for games, .NET is as fast as doing the same thing in C or C++, and can (in some cases) be faster.

You also get the huge benefit of automatic memory management (so you can new a heap object and then just forget about it), and a large class library at your disposal.

thecoop
I would disagree; .NET *is* slower, but the developer becomes many times faster.
STW
Please write the next generation H.264 decoder using .NET (or Java) and then we can talk.
R..
I agree (and their are many benchmarks out there) that show .NET is not significantly slower or faster than C++/Java. I disagree that automated memory management is an advantage (it makes it easier to use a language for a beginner (I agree there)). But in any non trivial .NET application you will need to understand and learn how the memory management works and do manual clean up of memory (using the appropriate C# facilities). I disagree with STW that it makes yo many times faster (certain types of program are easier to write in C# but the converse for any language X).
Martin York
A: 

So with Microsoft .NET, you get the advantage of language interoperability.

This isn't the main advantage. Most people code in C#, most try to avoid working on a project using both VB and C#

But I've heard that this is slower than native applications

.NET has memory management which may make it slower on some things. However, the classic example - games, a lot of XBox games are now written using XNA

And is dot net portable, or tied to windows?

There is a project called Mono which has ported .NET to linux and there is a platform called MonoTouch which runs that code on iPhones.

However, broadly in its Vanilla form it is tied to the WindowsOS.

Then what are the advantages

Most people code in C# because it's a powerful language both on the web and desktop and has an easy learning curve and good tooling. It also has a powerful class library similar but more comprehensive than Java's (IMO)

Rob Stevenson-Leggett
.NET is just one runtime implementing the C# language and Mono is a different runtime. I know that many .NET libraries are not available in Mono, but the *language* (C#) is the same.
FrustratedWithFormsDesigner
That's pretty much what I've said.
Rob Stevenson-Leggett