Overview
Explore type safety in C++ through this ACCU 2018 conference talk by Bjorn Fahller. Delve into the concept of "strong types" and their role in preventing bugs, enhancing code clarity, and improving performance. Learn techniques for creating type-safe alternatives to typedefs, ranging from simple methods requiring no library support to more sophisticated solutions using open-source libraries. Examine motivating examples, production and test code implications, and the pros and cons of different approaches. Discover how to leverage C++'s strong type safety guarantees through knowledge and discipline. Topics covered include template safe types, nested typesafe structures, magic numbers, encapsulation, arithmetic types, and various operations, providing a comprehensive overview of type-safe C++ programming practices.
Syllabus
Intro
Type safe
Storytime
Template safe type
Sample code
Bubble parameter
The problem
Observations
Typesafe
Nested Typesafe
Strong types
Jonathan Miller
Fluent
Not in production code
Secrets of my job
Magic numbers
Encapsulation
Arithmetic types
Operations
Taught by
ACCU Conference