Saturday, May 5, 2012

Can C# replace C++ ?

I have encountered the "Can C# replace C++" question numerous times, sometimes at work and quite a lot on the internet and the responses I see are usually confusing and sometimes just plain wrong.
So I'll start out with the general answer, C# is a powerful programming language that can do almost everything a native C++ application can do.

With C# I am able to bring more stable solutions to production in a shorter amount of time and at a lower price, thanks to the powerful libraries that come with it out of the box, the memory managed code and shorter training time for young and new programmers.

Good examples are the WPF, WCF and ASP.Net frameworks.

For programming all the optimized algorithms that I used to need C or C++ for, I can simply used an unmanaged function in C#.
When working with devices, I can usually find great wrappers or write my own in C#.

Having said all that, still I need C++ for writing all the low level drivers when context switching is a problem. But for most programming chores this is not the case.

I believe that C# is and will be the Mainstream programming language but will never completely replace C++

No comments:

Post a Comment