Inroducing C++ into your organization
Most embedded systems software is written in C. I’ve written a number of rants about the reasons that C++ can improve the quality of your software and the productivity of your team. But, making the switch from C to C++ is not easy.
In many ways C++ requires a new approach to organizing your code. Developing C++ objects requires more up-front thinking than writing C functions. Don’t expect to become a great C++ programmer on your first project. Pick a small part of a project, or better yet, refactor a bit of existing code as part of an upgrade, for your first attempt.
As Mark Twain said, “Experience is the best school.” but I say it’s more productive to learn from someone else’s mistakes - like mine. My first C++ experience was with a large completely new project. We finished a year late and over budget. Fortunately for the software team, we were also developing a complex ASIC that was nearly as late as the software. Our management understood and the company went on to adopt C++ for the embedded software for nearly all of their new product development.
Such stories are the exception. Usually management views such results as disasters and C++ is abandoned. Such horror stories abound in our community. Be realistic. Learn and adopt C++ incrementally. You’re much more likely to succeed.
Here’s some more advice about starting with C++ from Bjarne Stroustrup himself: The C++ Style Sweet Spot.







