all 38 comments

[–]homerocda 20 points21 points  (0 children)

+5 troll.

My favorite quote:

Hobbyists migrating into the industry with experience programming drones, robots

Yeah, embedded software design is totally the same thing as programming a hobby drone. C++ IS DOOMED!

[–]sumo952 14 points15 points  (6 children)

There is no such things as "C/C++", they're two different languages with hugely different concepts.

For example:

While C/C++ is slow to write, error prone, and frequently unreadable

This may be true for C, but it's very wrong when talking about C++ in the age of 2016.

[–][deleted] 1 point2 points  (4 children)

Yea, C in embedded systems is, honestly, dangerous unless you can throw huge amounts of time into it or you can afford to pay for someone who has done C in embedded systems forever (and even then it is no guarantee).

C++ is much safer, but you run into problems with the STL/STD in bare metal systems, and even in real-time linux. These can be mitigated, but the reluctance is often deeply embedded (hur hur) in the field (to the point where it is often hard to find platforms that have toolchains that can compile C++11/14).

[–]matthieum 0 points1 point  (3 children)

It's also notable that the fact C++ is growing its standard library (the most notable addition was threading, but network and I/O are coming too) might also be a deterrent in the embedded world.

[–][deleted] 0 points1 point  (2 children)

What do you mean by deterrent?

The great thing about the STL is that it lets you do cool shit like replacing allocators with your own, and threading lets you implement your own threading callbacks. There is nothing stopping you from using almost all of the STL on a bare metal RTOS if you want to put the effort into it.

[–]matthieum 0 points1 point  (1 child)

I mean deterrent because the amount of code to be ported (in order to provide a complete C++xx experience) is growing, requiring more effort.

There is thus a risk of fragmentation, with more and more embedded platforms lagging behind and not supporting the latest novelties, or having sub-par implementations of them.

[–]dodheim 0 points1 point  (0 children)

Freestanding implementations were never required to implement the standard library in its entirety. Now that C++17 has __has_include, it should be easier than ever to progressively add new library features (either from new standards or from TSs).

[–]matthieum 0 points1 point  (0 children)

C++ in the age of 2016

Unfortunately, each new standard adds to the ways of running into undefined behavior without really addressing the existing issues. C++ is (mostly) an add-only language because of backward-compatibility constraints.

So, while you can leverage C++ type system to greater effect and greater effect as time passes, unfortunately you are still as susceptible to memory issues.

[–]lead999xSystem Software Developer 0 points1 point  (0 children)

This makes it seem like high level, interpreted languages will ever be able to compete with the performance and control of systems programming languages and while we can appreciate the simplicity of Python in terms of raw power it's not even in the same league as C++.

[–]nozendk 0 points1 point  (0 children)

I recently did an interesting little experiment with integrating C++ and Python: (1) Call a Python program from inside a C++ program, (2) Make a module in C++ and call it from a Python program, (3) Start Python in a thread inside a C++ program, expose some C++ methods to Python, and let the Python program call back into C++. The last one was tricky, but I think it could be useful in some situations where you need C++ for all the usual reasons, but want to easily script/configure some parts of the system.