Monday, June 6, 2011

C++ vs. C#

Ladies & gentlemen, my dear readers - today I'm going to discuss the tough rivalry between the veteran C++ and its Microsoft counterpart C#. When shall we opt for the first and when we should favor the second.

A little beat of history - C++ was issued back in 1983 as a supplement to the C language, and its main topic was to add object oriented programming (OOP) capabilities to C. It was meant to b e used for creation of DOS applications (Windows wasn't reality then). C# was issued by Microsoft in 2002, as part of the .NET platform, which was meant to be Microsoft software development platform. Later on, it became a standard language (not necessarily usable just on the .NET platform).



So when shall we use the old (& good..) C++ when developing a new application? the answer lies within the basic purpose C++ serves: a medium-low language which is meant to deal with the hardware of the computer. We have to bear in mind that C++ was invented for DOS, and the software for DOS had to deal directly with the hardware (DOS wasn't as sophisticated as Windows). The conclusion is that we should choose C++ for applications manipulating directly the hardware, such as:

1. Security & privacy software - antivirus, anti-spam, anti-keyloggers.
2. Computerized graphics - 3D applications, image processing, video streaming.
3. Drivers - for printers,scanners,cameras,keyboard,mouses,USB devices.
4. Communication protocols - HTTP, TCP, SSL, SSH.
5. Operation systems applications - programs that encrich the functioning of the operation system.


As we can see, much of the software world isn't mentioned above, and this is exactly the portion of software applications we can conveniently develop in C#. C#, in its basic definition, suits application development which doesn't involve in the computer's hardware much and which is designated for use mainly on Windows operation system. C# is also suitable for web programming (i.e server side scripts), so mastering C# helps both in desktop applications development and in web applications development.

No comments:

Post a Comment