Why MSDN publishes more Managed Code than Native Code Information
This was a response to a response to a post on MSDN. But it was still interesting. The original thread is at:
Tom Archers Blog. His explanation was interesting, though too political for my taste. Anyhow here’s my rant/response…
Hello Microsoft management, you reading any of this?
Thanks for answering this question Tom. I also don’t buy the “Reporting the news” metaphor. I’ve noticed not many people have responded with “right on, I only care about .NET”
I personally really like .NET and managed code. The richness of functionality in the .NET portfolio saves huge amounts of time over constantly re-inventing the wheel with WIN32/etc. I have spent so much time trying to glue together different libraries that have different ideas about object management, allocation and deallocation in Native Code. With managed code all this becomes so much simpler. (Good riddance ATL) I can now pass data between applications and not worry about who owns it.
.Net has some really great attributes, but the (assumed) bloat and performance problems make it unusable for many applications.
What is the guideline for knowing when .NET / Managed code is usable? What is the performance penalty versus the equivalent (well coded) native implementations? Is the only solution for each developer to just try it? Is the JIT compiler for C# much better than we think? (and this isn’t as bad of a problem as we all think it is)
Assuming managed code performs as bad as rumor has it. I have a prediction:
The main stream is all going to mottle about (like me) and all reach the same conclusion. Managed code is really great for passing objects between large blobs of code developed by different groups and .NET is really great for its rich set of functions, but you still need unmanaged code for speed. So most devs will decide they want C++ with managed extensions. I can now switch between managed objects and unmanaged data as much as I want. I can code “inner loop” type functions using unmanaged data types all day long
So why am I reading the C++ with managed extensions is being deprecated for CLR? CLR doesn’t look like C++ to me.
Some other good sources:
http://www.ondotnet.com/pub/a/dotnet/2003/03/03/mcppp2.html
http://en.wikipedia.org/wiki/Managed_C%2B%2B
Using NGen for performance benefits