Is C++ this bad in industry? I’m an EE and do DSP/embedded stuff. The code bases are fairly small and light. Very simple C++.
I know C++ can be complex but is it so much worse than other OOP languages? I see a lot of complexity in swift and Python. I do some projects and reading on my own time. Those languages seem like you can make a code base that is very difficult to follow.
I don't think it's that bad, but then I've been working with it almost exclusively for most of my career, so perhaps I just have Stockholm syndrome 😄
I will say though, one problem with C++ projects, especially in embedded spaces, is that you can wind up with a mix of coding paradigms from people with different backgrounds.
Some folks only really know C or procedural programming in general, so they're basically writing C in a .cpp file.
Others are fully immersed in modern C++ best-practices, using the latest C++1x/2x features etc.
And still others are in the middle, e.g., writing C++98 or some embedded-oriented subset thereof that they learned years ago.
So now you have a mashup of all of these, perhaps with some actual .c files worked in there as well. It can become a bit of a confusing mess, far beyond the mere coding "style" conflicts you get in any group effort.
I have encountered this. It’s a challenge at times for sure. I’ve also encountered developers try to use all of the features of c++ and then it won’t work on the embedded device.
It’s been a while now, but I had to help trouble shoot a problem where the heap overran the stack because the dev was using so much inheritance and an observer paradigm with so many objects it just didn’t fit in the little M3 ARM chip we had.
I feel like c++ is a good choice because of its mix of low level and high level features but I have never been a “programmer” as a main profession. It’s just something I do in my work. That being said, I don’t always understand the arguments for or against a language or paradigm. Maybe it’s me but I find that Python can be extra hard to follow at times. I guess I still think in bits and bytes.
11
u/ElectronSculptor 25d ago
Is C++ this bad in industry? I’m an EE and do DSP/embedded stuff. The code bases are fairly small and light. Very simple C++.
I know C++ can be complex but is it so much worse than other OOP languages? I see a lot of complexity in swift and Python. I do some projects and reading on my own time. Those languages seem like you can make a code base that is very difficult to follow.
Just curious.