Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why isn’t the SDK written in C++?

This may be an unpopular question but the Nordic SDK seems to go to great length to perform what is effectively object-oriented programming while still avoiding c++. This leads to, among other things, an overly complex sdk rife with macro string concatenation and other evils. In our project we spent the first six months wrapping every part of the sdk into a coherent object model. The wrapping was painful but paid off dividends when we went to actually do the real work. 

Hopefully I don’t need to extol the virtues of c++ in embedded systems. Others have already done that for years: https://www.embedded.com/design/programming-languages-and-tools/4438660/Modern-C--in-embedded-systems---Part-1--Myth-and-Reality

Has Nordic considered this?  It would make your products much more attractive, at least to us. 

Parents Reply
  • I would also like to switch to C ++ for a number of reasons. I will give the main thing: the project colleagues have a large number of developments in C ++ and they have to rewrite their existing code to pure C. It is sad (

    But I still stop things like:
    - freeRTOS written in pure C;
    - SDK from Nordic also written in pure C.

    But I do not think that I will be able to go fast enough and just go. On the other hand, the availability of support in SDK will contribute to the progress in the development of programming skills).

    Maybe arrange a survey and see how many people actually want to see support for C ++?

Children
Related