Why C++?

Eric Battalio

A few weeks ago, I had an opportunity to share a few scenarios where C++ really matters to an internal audience from the field. No demo code or sample projects were reviewed, just the scenarios and first-hand examples.

Why C++?

  • Learn “what those C++ folks” know. Some developers feel a pull towards the preciousssss, C++. Sure, it has a bad rep as being full of pointers and other complexity, but its power is unmistakable. [I a great customized picture of the One Ring with “C++” on the top but cannot use it here L]
  • Application lifecycle support tools. Developers often need to create small extensions, command-line tools, and other bits of code to improve the build process, massage files, control deployment or other process details.
  • Shared code libraries. Libraries provide core functionality (think XML processing, text processing, network communication) to a wide audience. C++ enables fast, efficient and elegant code.
  • Hybrid devices. Embedded devices rely more on C but there is a growing hobbyist community around hybrid devices like the Raspberry Pi that can host programs written with C++. This could be the beginning of SkyNet.
  • Niche applications. Looking for a developer job in the financial markets? Math and C++ are must haves! Many unique applications require advanced science work and some experience with C++.
  • Lively debates about syntax. Debating the finer C++ points of auto, when to use lambdas, brace formatting, and move semantics reinvigorates the soul (and helps influence future standards).
  • Application needs to access native code. C++ is the bridge that links managed code to the rich ecosystem of existing, stable and mature native code including open source libraries like OpenCV, Lucene, Cinder, and FFMpeg.
  • Tuning a managed application. C++ can be used to speed up sluggish managed applications. When the profiler points to managed code that has already been optimized, the best choice might be to let C++ handle it (C++ AMP anyone?).
  • Code maintenance. There is a lot of code out there. Much of it is C and C with classes, but much more is C++ and relies on the flexibility and control of the language.
  • Porting code to a new application. New applications are built from the creaky bones of decades-old legacy applications. C++ developers can decode requirements from old native code and express them in modern C++ or other language.
  • Three letters: M F C. MFC lives!
  • Repackage logic. Native code in existing native apps can be repackaged in C++ for new apps targeting different platforms and form factors.
  • Graphics, graphics, graphics. C++ is the choice for the most immersive graphics experience. Data visualization, bleeding-edge user interfaces, the next Pixar movie…
  • Intense multimedia processing. Sound, images and video gobble up bandwidth. C++ and Visual Studio 2013 makes it easier to optimize this type of code for the best performance.
  • Cross platform development. When an application must be cross platform, C++ is hard to beat. There are differences between compilers, but adherence to the standard goes a long way.
  • Custom device support. Native code is used extensively in device support. Developers use C++ to write device drivers, SDKs and sample applications for stuff like sound input, 3d printers and scanners.
  • Pushing the boundaries of computing. C++ can be found at the heart of many high-performance computing applications. Meteorology, chemistry, physics, visualization, genetics….
  • “It’s fun!” –survey respondent, 2013

Do you agree with these scenarios? Did I miss one? Do you have detailed examples for any of these that you would like to share (and get credit for if used in future presentations)?

Drop me a line (ebattali@microsoft.com) or comment below. Thanks!

0 comments

Discussion is closed.

Feedback usabilla icon