Monday, 12 August 2013

What C++ has in offer...

Speed: The language not only optimizes in terms of how you program but also makes optimal use of hardware cache. For Example, std::vector gets cached in processor irrespective of its size. Today's Processors come with rich inbuilt cache, let’s make best use of them.

Efficiency: Threading libraries and Parallel/concurrent programming helps in more throughput. In Financial sector the focus is on high demanding applications that need performance. The “king” is Performance per Watt, per Cycle, per Transistor: Performance per Dollar.

C++11: C++11 has a lot of new features. Soon we will use these Features in order to take advantage of new frameworks (like C++ AMP). “C++ matters again as a first class system” i.e. it provides choice at the user level for Windows, Mac OS X and Linux as well as a range of web user interfaces. Imagine the benefit of being able to support the Windows, Mac, and Linux users within your organization with a consistent, identical suite of services.

Alleged Non managed Language: Managed languages don’t have the performance, deployability or serviceability (among others) required to develop a Large Systems or Operating System. That’s why Windows nowadays is all C and C++ and will probably stay that way. The bottom line is that C++ is close to the metal, which means that everything in the execution is right in the code.

Error Proneness: C++ “language” doesn’t provide helpful black box functionality? If there was such a language that could prevent bugs in the software, we wouldn’t be having this discussion.  Everyone would switch.  Fact is, you can write bugs in any language.  When it comes down to the eleventh hour and the problem just has to be solved before I go home that night I need to be able to conveniently walking through every line of code in the debugger.  The so called helpful black box in coder friendly programming languages, that usually works, just becomes a nightmare then.  

In the end choice of language is more like choosing the right size hammer for the nail. For example, if I want to write a device driver for a hardware, I would go for C. If I want to write graphics intensive I would go for C++. If I want to write a new OS I would go for assembly and C. If I want to do text pattern matching and replacement, I would go for Perl/Python. If I want faster web development I would go for Java, PHP. If I want more interactive web page effects, I go for Javascript.

No comments:

Post a Comment