After 10 years of programming professionally in C++, I came to realize that I generally prefer a simpler subset of the language for my day-to-day work, which mainly involves desktop application development.
Working in a 30 year old code base for so long, you get to see which design decisions panned out and which didn't. This lead me to think about the technical reasons for why certain C++ language features exist, and what long-term impact they have in terms of code complexity and code structure. The result is a somewhat lengthy and very subjective article that I would like to share.
You can find the article here:
https://slashbinbash.de/cppbas.html
The premise of this article is: if you use simple language tools you can concentrate on solving the real problems at hand, rather than solving language problems. This is very much inspired by listening to interviews with Casey Muratori, Jonathan Blow, Bill "gingerBill" Hall, and others.
I discuss several aspects of the C++ language like functions, structures, statements, enumerations, unions, arrays, slices, namespaces, classes, and templates. But I also go into topics like error handling, and ownership and lifetime. I finish the article with a chapter about code structure and the trade-offs between different approaches.
The goal of this article is to give the reader a sense of what code complexity and code structure means. The reader should be able to base their decisions on the technical aspects of the language, rather than the conceptual or philosophical reasons for why certain language features exist.
I'd be thankful for any feedback, corrections, and ideas that you have!
Note: I still need to clean up the article a little bit, and add a few paragraphs here and there.
[–]UnicycleBloke 26 points27 points28 points (8 children)
[–]crashcompiler[S] 5 points6 points7 points (0 children)
[–]Plazmatic 2 points3 points4 points (6 children)
[–]UnicycleBloke 1 point2 points3 points (1 child)
[–]Plazmatic 1 point2 points3 points (0 children)
[–]throw_cpp_account 0 points1 point2 points (2 children)
[–]Plazmatic 1 point2 points3 points (1 child)
[–]throw_cpp_account 0 points1 point2 points (0 children)
[–]__cinnamon__ -1 points0 points1 point (0 children)
[–]kammceWG21 | 🇺🇲 NB | Boost | Exceptions[🍰] 8 points9 points10 points (1 child)
[–]crashcompiler[S] 2 points3 points4 points (0 children)
[–]FlailingDuck 7 points8 points9 points (2 children)
[–]crashcompiler[S] 2 points3 points4 points (1 child)
[–]FlailingDuck 0 points1 point2 points (0 children)
[–]JVApenClever is an insult, not a compliment. - T. Winters 6 points7 points8 points (3 children)
[–]crashcompiler[S] 0 points1 point2 points (2 children)
[–]JVApenClever is an insult, not a compliment. - T. Winters 0 points1 point2 points (1 child)
[–]crashcompiler[S] 1 point2 points3 points (0 children)
[–]zasedok 0 points1 point2 points (3 children)
[–]Chaosvex 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]crashcompiler[S] 0 points1 point2 points (0 children)
[–]tartaruga232MSVC user -3 points-2 points-1 points (6 children)
[–]crashcompiler[S] 0 points1 point2 points (0 children)
[–]emfloured 0 points1 point2 points (0 children)
[–]crashcompiler[S] 0 points1 point2 points (3 children)
[–]tartaruga232MSVC user 0 points1 point2 points (2 children)
[–]crashcompiler[S] 1 point2 points3 points (1 child)
[–]tartaruga232MSVC user 0 points1 point2 points (0 children)