Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
Why mbed selects C++?
Why mbed selects C++? In embedded field, C is a more widely-used language than C++. There are many firmware programmer don't know about C++(In China). If mbed used C, it would be welcomed by more programmer.
2 Answers
9 years, 1 month ago.
C++ is probably easier for beginners, and the overhead is acceptable for most of the mbed targets. While traditionally C is indeed more popular, I do think C++ is gaining ground. However it is possible to use much of the mbed API as C, since the underlying functions are all C. The C++ part is more a wrapper, but a wrapper which does implement some of the logic required.
That said, if you are competent in C, I don't think it should take you more than a week to get productive in C++, if you just look at the basic like classes. Of course you will run into stuff which takes more figuring out (like templates), but the basic is really similar.