Friday, May 21, 2010

C# over C++?

Why do people say C# is better then C++? Also is there still a need for C?





- Cheers, Daniel

C# over C++?
It really depends on what area of application you trying to implement.





For example, I will agree, C# is better, if you are doing development for windows or web based application, as it is truly object oriented and the code is easier to understand. And there is no pointer in C#.





As for C, I think it is still very important and useful in hardware programming, meaning, hardware level kind of work.





If you are a boss, you would invest in C#, rather than C++ as the number of expert in C++ is not growing and you will find more people holding skills in C#, so when come to hiring, you may have a hard time looking for such resource, and it will be higher cost in terms of salary because of the tight supply of C++ programmers.





I suggest, for C++ programmers start to adopt another new modern programming language to ensure a smooth way ahead. Cause, the work for C++ programmers is getting lesser and mostly for hardware programming.





So for those in hardware programing, I think still quite ok to hold on, on C or C++.
Reply:C# is better than C++ because (although it has a minimal performance hit ,of being managed code against native code) it runs in a virtual machine (.Net CLR) and invulnerable to the buffer overflow (root of almost all worms and trojans) and similar attacks. .Net framework provides a very easy access to many APIs using centralized System. and Microsoft. namespaces. ALso the code is write once run everywhere like java, all you need is to port the CLR. (i.e. there is open source MONO, GNU .NET and ROTOR which runs compiled .Net code on linux.





Yes, there is still need for C as most OS kernels (Windows, Linux) are written in C (not C++) thus the drivers written for those OS need to be written in C. Also many lightweight hardware platforms like microcontrollers don't have enough resources to support C++ and OO.





Loren Soth
Reply:As a firmware developer I can state that C/C++ programmers are still VERY much in demand, in fact if anyone knows of a Linux C++ programmer in the Denver area that needs work, contact ADIC out of Englewood! We are looking for good people!





This will probably always be the case since new hardware is constantly being developed and C is the de-facto standard for systems programming. The Linux kernel is written in C and so are most kernels that I can think of. Anyone who thinks that the world revolves around C# is only a application developer and takes for granted all the underlying systems and device drivers that they make use of.





C# is great for Windows application programming, or so I hear. Being strictly a Unix/Linux/VxWorks developer I can tell you that there is no place for C# in my world...only for C++ and C.


No comments:

Post a Comment