Erle Robotics C++ GitBook

Why to use C++?

The advantages in regard to write processor instructions are the followings:

  • Conciseness: programming languages allow us to express common sequences of com­ mands more concisely. C++ provides some especially powerful shorthands.
  • Maintainability: modifying code is easier when it entails just a few text edits, instead of rearranging hundreds of processor instructions. C++ is object oriented, which further improves maintainability.
  • Portability: different processors make different instructions available. Programs writ­ ten as text can be translated into instructions for many different processors; one of C++’s strengths is that it can be used to write programs for nearly any processor.

C++ is a high-level language: when you write a program in it, the shorthands are sufficiently expressive that you don’t need to worry about the details of processor instructions. C++ does give access to some lower-level functionality than other languages (e.g. memory addresses).