Since RTOS developers most likely do not know C ++ well enough.
Some people think that C ++ has overhead and costs that make it somehow unsuitable for embedded programming systems, that it lacks control and C brevity, or that although it may come to some kind of application niche, it never will not supersede C as the language of choice for embedded systems.
These perceptions are erroneous. where compilers and other tools are adequate, C ++ is always preferable to C as an implementation language for embedded systems. By doing everything C does, it offers more options for expression, encapsulation, reuse, and even improves the size and speed that are impractical in C.
Why, then, are these perceptions preserved? The main reason is that when people form their opinions, they know much more about C than about C ++. They have read several books written with some code and are competent in using the features of C ++, but they lack knowledge of what is happening in the hood, an acquaintance that allows one to visualize disassembly during text input or even design wording.
Embedded software applications are most often written in C. Over the years, C ++ has been seen as a natural successor and found greater acceptance, but its increased use was much slower than expected.
There are several reasons for this. Firstly, embedded developers are quite conservative and prefer to use proven solutions, rather than new ones "if it does not break, do not fix it."
There is also a lesson in experience. Many developers tried to use C ++ for embedded applications and failed. Such crashes can sometimes be attributed to flaws in the development tools, but more often than not, it is the misuse of the language “looking at an embedded system such as a desktop computer”, which is to blame.
Limitations of C Although C is widely used, it has limitations because it is not intended for embedded applications or for projects of scale, which is now a common occurrence. Key limitations include:
1) C is extremely powerful and flexible and therefore can be dangerous (it has a low level of capabilities that are useful to the built-in, but also pose many errors for the careless.)
2) Programmers must be very methodical and disciplined.
3) Programmers must understand how the program behaves at low and high levels (large projects are therefore difficult to maintain)
4) Programmers require expert knowledge of the application
However, C ++ has powerful object-oriented features that can greatly help with removing C restrictions:
1) it encapsulates and hides areas of high experience from non-specialists in “objects”; (A test case will demonstrate the encapsulation of experience later in Part 2 in this series).
2) Objects can be used intuitively by lay people for the implementation of conceptual projects at a high level