Explore the power of C++'s type system in this conference talk from C++Now 2019. Learn how to leverage strong typing to create safer, more expressive code. Discover the pitfalls of using primitive types for domain values and understand the benefits of implementing custom wrapper types. Examine historical perspectives on type systems, from early programming languages to modern C++. Delve into topics such as integral promotion, numeric conversions, and the challenges posed by C++'s legacy. Gain insights into implementing and teaching simple wrapper types, and explore a work-in-progress framework for mixing in operators safely. Understand how proper domain types can enhance code clarity and prevent common errors, using examples from the standard library and real-world scenarios. Apply the Whole Value Pattern to improve function interfaces and reduce bugs caused by parameter confusion.
How I Learned to Stop Worrying and Love the C++ Type System