View Single Post
Old Jan 2nd, 2007, 2:55 PM   #4
Tim
Unverified User
 
Join Date: Dec 2006
Location: Bristol UK
Posts: 19
Rep Power: 0 Tim is on a distinguished road
I believe that Microsoft it pushing .net as the number one platform to develop windows apps on, so its is probably a good idea to have a basic understanding of what it is.

It abstracts the programmer away from the complexities of low level programming that C++ allows. This is its main advantage and disadvantage. It is nearly impossible to cause a buffer overrun or to have a memory leak in a .net app. On the down side the execution speed is reduced slightly and significantly significantly on the first run. This is due to the JIT compilation of the .net assemblies, whereby the first time a method is called it is converted form MSIL to x86(or whatever). If you call that method again it will be already in x86 machine code so will run nearly as fast as C or C++. Also there is the non-deterministic nature of the garbage collector. You can never tell when it will sweep unless you explicitly cause it to run. So it is defiantly not suitable for real time applications.

The other advantage is that .net assemblies can work together no mater what language they were written with. So you can use a class written in VB.net in a c# app. As long as your .net compiler outputs assemblies that are correct and conforms to the common language specification (CLS) you code will work seamlessly with any other .net language.

There is also the fact that the .net base class library is very rich. Even if functionality is not there it is very easy to call a native C function such as Beep. This is one area that Java lacks horribly. When java was originally designed they thought that by creating a rich set of standard libraries people would never want to call C code, and this is not the case. It is not very simple to use JNI(the system to call C code form Java) and is the source of some very subtle bugs.

Also there is the fact that C# was designed by Anders Hejlsberg, the same person that wrote Turbo Pascal and designed Delphi. c# is a very easy to learn language that is very expressive. I personally prefer C# over Java or VB.net for RAD programming.
Tim is offline   Reply With Quote