Thought Leadership

Why move to C++?

As I am on vacation this week, I thought that I would leave behind a short note, which might provoke some discussion.

The most widely used programming language for embedded systems continues to be C. I observe great interest in the use of C++ and have frequently written and talked about the subject. Its adoption is also progressing steadily, though much more slowly than anticipated a decade ago. With this in mind, I would like to pose two key questions:

Why would you move to C++?

  • Is it because you want to use object oriented coding techniques?
  • Do you just want a “better C”?
  • Do you want to be able to leverage class libraries?
  • Do you think that the language results in more manageable code for larger projects?
  • Do you just want to be up to date?
  • Or something else …

Why would you not want to move to C++?

  • Is it because you are just happy enough with C?
  • Have you hear too many horror stories?
  • Are you worried about resource [memory] utilization?
  • Are you concerned about legacy code?
  • Or something else …

I would be pleased to receive any input via email or comment. Thanks.

Colin Walls

I have over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, I am a member of the marketing team of the Mentor Graphics Embedded Systems Division, and am based in the UK. Away from work, I have a wide range of interests including photography and trying to point my two daughters in the right direction in life. Learn more about Colin, including his go-to karaoke song and the best parts of being British: http://go.mentor.com/3_acv

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/embedded-software/2011/03/14/why-move-to-c/