“Value Semantics: It ain't about the syntax!, Part I"
summary
Defines what “value” really means for C++ types by naming the salient attributes that must match for two objects to be the same value, shows why copying bits (shallow copy of string) or preserving capacity (vector) is irrelevant, and gives the practical rule that operator== acts as the operational definition of value. Demonstrates counterexamples (allocators, thread pools, scope guards, pointers, unordered vs ordered containers) and states the Essential Property of Value: applying the same salient operations to equal values yields equal results.
AI-written summary · about
chapters (28)
- 0:00Introduction
- 2:05Outline
- 8:15Value
- 13:48Mathematical Types
- 17:48Operations
- 19:30Date classes
- 22:55What are salient attributes
- 23:49Mental exercise
- 25:27The same ethereal type
- 29:00Vectors
- 30:04Documentation
- 30:21Why is value important
- 30:41The ethereal type
- 32:34Its not just an exercise
- 33:21Pointers
- 34:06Thread Pool
- 34:32Alligators
- 35:39Threadsafe Queue
- 38:51Abstract Interfaces
- 39:28Tom Cargill
- 44:12Value Semantics
- 44:57Copy Constructor
- 45:24Operator Equal
- 46:05CMOS
- 47:58Assignment
- 48:36Unundecidable
- 53:41Subtle Essential Property
- 54:13Thought Experiment
related talks
59mThe Most Valuable Values
01h 00m“Enhanced Support for Value Semantics in C++17”
58mModern C++ Design (part 2 of 2)
01h 04m“Sane and Safe C++ Classes”
01h 20mWhat Classes We Design and How
01h 02mObjects vs Values: Value Oriented Programming in an Object Oriented World
55m“Using Types Effectively"
01h 23mThis is C++ - How to Use the C++ Superpower to Write Better C++ Code
