Overview
Explore value semantics in C++ programming through this comprehensive CppCon 2022 talk by Dave Abrahams. Delve into the concepts of safety, independence, projection, and their impact on the future of programming. Gain insights into the strengths of C++ value types, understand the challenges in defining value semantics, and discover how future C++ developments might enhance safety, performance, and programmer confidence. Learn practical guidelines for improving your programs today and prepare for the follow-up talk "Val wants to be your friend." Examine topics such as reference semantics, engineering costs, implicit sharing, design by contract, race conditions, immutability, local reasoning, and various value semantic problems. Conclude with a summary, challenge, and Q&A session to reinforce your understanding of this crucial aspect of C++ programming.
Syllabus
Introduction
Problem
Reference semantics
Engineering cost
Implicit sharing
Object graph
Design by contract
Race conditions
Example
Safety
Immutability
Local Reasoning
Documentation
Value Semantics
References
Value Types
Value Semantic Problems
C Value Semantics
InPlace Independence
Const Reference
InOutIn
virtuous cycle
how to achieve value semantics
whole part relationships
Extrinsic relationships
Object graphs
Creating a new type
Summary
Challenge
Questions
Taught by
CppCon