4 ms·
No. First of all, embedded probably constitutes more than 5% of all C++ jobs. Second, embedded is not the only area where C++ is essentially written like C. It
by adrusi 11y ago
No.
First of all, embedded probably constitutes more than 5% of all C++ jobs. Second, embedded is not the only area where C++ is essentially written like C. It might be changing no, but for decades, that's how most C++ was written.
In games, for example, it's common to see the only C++-specific features used being operator overloading for vectors and matrices and maybe a couple templates.
In highly-regulated safety-critical domains, the language is restricted by style guides that essentially limit the available features to a subset of C.
And beyond that, writing C++ as just "C with some extra features I want" is a popular style. GCC, for example, uses only destructors and templates, and is otherwise just C.
It's not a bad thing. It's not clear that C++ is an improvement over C in terms of ease of use or maintainability. Projects written in C++ tend to develop complexity faster than those written in C.
- nly 11y ago> GCC, for example, uses only destructors and templates, and is otherwise just C. Well, to be fair, that's because the GCC codebase was written in C and later switched to bootstrap in "C++ mode". Introducing C++ features in to an existing production-ready, 30 year old, C codebase is not going to happen quickly. Both Clang and LLVM, on the other hand, use C++ features pretty readily. > It's not clear that C++ is an improvement over C in terms of ease of use or maintainability. Projects written in C++ tend to develop complexity faster than those written in C. Complex projects can grow complex because they're... well, inherently complex. So maybe inherently large, complex projects just require the power of C++? We both clearly have a personal bias one way or the other. Personally, I despise C. As well as a lot of the things I like, pretty much everything I hate about C++ comes from C (header files, implicit integer narrowing, and undefined behaviour wrt signed types, for example.). Cs lack of power and expressiveness has also lead to pervasively poor, lazy API design (libc and most of the POSIX APIs, for instance, are total garbage).