4 ms·
>"That is because C++ is not taught properly. It is not just a collection of syntactical features but a multi-paradigm language (i.e. supporting Procedural, Obj
by bogomipz 4y ago
>"That is because C++ is not taught properly. It is not just a collection of syntactical features but a multi-paradigm language (i.e. supporting Procedural, Object-Oriented, Generic and Compile-time) where a feature is best suited to a particular paradigm and can also be used to express different concepts. Once you grasp this, things become quite clear and you understand how to design in C++."
Might you or someone else recommend a resource that does explain which features are suited for each the programming paradigms C++ support? Is there a modern resource that does teach it correctly like this? Knowing what features are relevant to your paradigm seems like a good way to approach learning C++.
- rramadass 4y agoC++ actually has two axes; 1) Paradigm axis (i.e. Procedural, Object-Oriented, Generic, Compile-time and Functional) and 2) Usage axis (i.e. Low-level bare-metal, Kernel, Library, Application). Every feature has an ideal application at the intersection of these two axes. Another way to look at it is how best to map concepts from the Problem-domain directly onto language features. Here techniques like Commonality/Variability analysis (bedrock of DDD, Patterns etc.) are used to express concepts using specific language features and then combine those into a coherent design. Most of the above design ideas are found only in pre Modern C++ books. I don't know of any newer books which actually teach multi-paradigm design using Modern C++. So you will have to read the older books and then think about how you would map the same ideas into Modern C++. You might find the following useful; Pre Modern C++: 1) Multi-Paradigm Design for C++ by James Coplien. 2) Scientific and Engineering C++: An Introduction With Advanced Techniques and Examples by John Barton & Lee Nackman. 3) Advanced C++ Programming Styles and Idioms by James Coplien. 4) Modern C++ Design: Generic Programming and Design Patterns Applied by Andrei Alexandrescu. Modern C++: 1) Functional Programming in C++: How to improve your C++ programs using functional techniques by Ivan Cukic.
- bogomipz 4y agoThank you for the wonderfully insightful and detailed response. This is really helpful. Cheers!
- rramadass 4y agoYou are welcome. For learning Modern C++, you might find these recommendations useful: https://news.ycombinator.com/item?id=32884432 https://news.ycombinator.com/item?id=32884432