Reusable code, reusable data structures

Sebastian Theophil

⏱ 60 minute session
beginner
intermediate
advanced
14:00-15:00, Thursday, 4th July 2024

DRY -- don't repeat yourself -- is an important software engineering principle. Repetitive code is error-prone code. Inevitably, and sooner rather than later, we will forget to change one of these repetitive code locations. C++ offers many different tools to share code and data and I often see novice and intermediate programmers struggle with choosing the best one in each situation. We have template functions, template classes, std::variant, virtual classes and std::any. We have some common associated programming patterns like CRTP, templated base classes, template functions taking function arguments. All of these have their uses and in my talk, I want to develop some intuitions on when to use which.


🏷 Best Practice
🏷 Generic Programming
🏷 Software Engineering
🏷 Templates

Sebastian Theophil

Sebastian has been working at think-cell Software since its founding in 2002. In the last few years, among many other things, he has ported think-cell to run on macOS. He is also the maintainer of the typescripten project which lets programmers call JavaScript libraries from C++ code compiled to WebAssembly in a convenient and type-safe way. He enjoys leaving his desk from time to time to talk at international C++ conferences.