Quote:
Originally posted by TheCPUWizard
At present the .NET framework is definately NOT faster than WinAPI. There are a couple of reasons:
1) Windows is currently native on the WinAPI. .NET must call the API. When the next round of windows comes out, this becomes inverted (The WinAPI calls will be routed to .Net
2) .Net is currently a version 1.x product. There are a number of areas where optimization was not done in order to ship a reliable product on-time. Much of this is addressed in Whidbey (.Net 2.0)
3) .Net performs run-time checks. Straight C/C++/WinAPI does not do this inherently. Look at all of the buffer overruns that have plagued windows. (Over)simply stated this was because programmers did not check everything for validity. When programming to a managed platform (.Net) this is all performed automatically, the user does not have to do this. In fact the user can NOT overrite a buffer even if they want to (unless they mark the code as unsafe and do a few other things). If every condition is validated in straight C/C++, then the performance becomes comparable.
4) Policy based Code Access Security models [and if you dont know what that means, then you have not even scratched the surface of .Net] can not be implemented without a framework.
5) People can write crap in any language. People who do not understand the ramifications of the .Net platform [I have probably logged close to 6000 hours of .Net programming and still rely heavily on references and am discovering things..] will write crap using .Net. If you think this makes it more difficult then C++, I invite you to give me a good explaination of Alexandrescau's "Modern C++ Design"]
6) I believe I did answer your second question. In about 3-5 years all programming for windows platforms will be done directly or indirectly to .NET. Programmers who do not wish to use .NET will not be programming on Windows [and possibly not on other systems that adopt the open CLR standards].
7) Moving to CLR from unmanaged applications is as big or bigger of a paradigm shift as the move from C to C++ was 14 years ago [NoHero...You remember those days don't you :p]. People who try to treat it as a small incremental change dont get the concepts, and will continue to struggle, complain and probably fail.
Ok very good reasons though ... I will change to .NET ...