Tuesday, March 8, 2011

C++ vs C#

It is a toolbox, nothing more.  Take out the tool you need to do the job.  If you wish to wax lyrical about a particular wrench that is just your favorite or perhaps the one you use the most, that is fine.  However, remember that even diehard gearheads that worship their 6point socket set still have a hammer in the toolbox.

Do not use one language for all things.  Even if it is perl.

All that said here is my opinion on when to select one over the other.  If you are utilizing more than a small subset of .NET functionality use C#.  Managed C++ with CLI is a crutch for interfacing some specific item that is third party and not in your power to change.  (It probably should be bundled into a DLL to avoid the crutch at all)  C++ should be reserved for large systems where you don't want or need clunky chucks of library coming along for the ride.  IE Where the design may be counter to the assumptions of the people providing the .NET bits that might otherwise be used for that functionality (which leads to a long term issue with the ability to optimize).

And there you have it, not earth shattering.  Use the wrench that fits better, they are both adjustable to some degree.

No comments:

Post a Comment