Ask HN: What's the right subset of the C++ language?
What's the right subset of C++ to work with? What's the wrong one? Any references would be appreciated.
Thanks.
What's the right subset of C++ to work with? What's the wrong one? Any references would be appreciated.
Thanks.
Embedded projects that use C++ like to stick to specific features/rules to minimize things like hidden dynamic allocations etc. e.g. std library is sometimes forbidden on some embedded projects. But if you understand the std lib you can use it still and avoid hidden dynamic allocations etc.
Because it depends so much on the project, that is why project standards and coding guidelines become fairly critical regardless of language.
And I disagree when I hear people say the wrong subset of the C++ language. I'd argue instead that it is no different then most any language, for example, C# or Java. Both of which I would avoid parts of the language and included frameworks in some cases and use them in others.
As far as unmaintainable, I have absolutely seen a ton of C/C++ that is nearly unmaintainable. But I have seen equally as much Java, C# and Javascript that is the same, so it is more about architecture and engineering then just the language. I am also a firm believer of choosing my language based on the problem I am solving, the wrong language can make your life difficult and make code maintenance much harder.