CppCon 2015: John Lakos “Value Semantics: It ain't about the syntax!, Part I"

http://www.Cppcon.org — Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2015 — When people talk about a type as having *value* *semantics*, they are often thinking about its ability to be passed to (or returned from) a function by value. In order to do that, the C++ language requires that the type implement a copy constructor, and so people routinely implement copy constructors on their classes, which begs the question, "Should an object of that type be copyable at all?" If so, what should be true about the copy? Should it have the same state as the original object? Same behavior? What does copying an object mean?! By *value* *type*, most people assume that the type is specifically intended to represent a member of some set (of values). A *value-semantic* *type*, however, is one that strives to approximate an abstract *mathematical* type (e.g., integer, character set, complex-number sequence), which comprises operations as well as values. When we copy an object of a value-semantic type, the new object might not have the same state, or even the same behavior as the original object; for proper value-semantic types, however, the new object will have the same *value*. In this talk, we begin by gaining an intuitive feel for what we mean by *value* by identifying *salient* *attributes*, i.e., those that contribute to value, and by contrasting types whose objects naturally represent values with those that don't. After quickly reviewing the syntactic properties common to typical value types, we dive into the much deeper issues that *value* *semantics* entail. In particular, we explore the subtle *Essential* *Property* *of* *Value*, which applies to every *salient* mutating operation on a value-semantic object, and then profitably apply this property to realize a correct design for each of a variety of increasingly interesting (value-semantic) classes. — John Lakos, author of "Large Scale C++ Software Design.", serves at Bloomberg LP in New York City as a senior architect and mentor for C++ Software Development world-wide. He is also an active voting member of the C++ Standards Committee, Library Working Group. Previously, Dr. Lakos directed the design and development of infrastructure libraries for proprietary analytic financial applications at Bear Stearns. For 12 years prior, Dr. Lakos developed large frameworks and advanced ICCAD applications at Mentor Graphics, for which he holds multiple software patents. His academic credentials include a Ph.D. in Computer Science ('97) and an Sc.D. in Electrical Engineering ('89) from Columbia University. Dr. Lakos received his undergraduate degrees from MIT in Mathematics ('82) and Computer Science ('81). His next book, entitled "Large-Scale C++, Volume I: Process and Architecture", is anticipated in 2014. — Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

TARGET AD 2
2015/10/16 CppCon   Share on Facebook

RELATED VIDEOS

CppCon 2015: John Lakos “Value Semantics: It ain
Play Video

CppCon 2015: John Lakos “Value Semantics: It ain't about the syntax!, Part II"

2015/10/16
CppCon 2015: Michael VanLoon “STL Algorithms in Action ”
Play Video

CppCon 2015: Michael VanLoon “STL Algorithms in Action ”

2015/10/16
CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"
Play Video

CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"

2014/09/27
CppCon 2015: Andrei Alexandrescu “std::allocator...”
Play Video

CppCon 2015: Andrei Alexandrescu “std::allocator...”

2015/10/13
CppCon 2015:Marshall Clow “Type Traits - what are they and why should I use them?"
Play Video

CppCon 2015:Marshall Clow “Type Traits - what are they and why should I use them?"

2015/10/18
CppCon 2014: John Lakos "Defensive Programming Done Right, Part I"
Play Video

CppCon 2014: John Lakos "Defensive Programming Done Right, Part I"

2014/10/15
CppCon 2015: John Farrier “Demystifying Floating Point"
Play Video

CppCon 2015: John Farrier “Demystifying Floating Point"

2015/10/15
CppCon 2016: Casey Carter “Iterator Haiku"
Play Video

CppCon 2016: Casey Carter “Iterator Haiku"

2016/10/07
CppCon 2015: T. Winters & H. Wright “All Your Tests are Terrible..."
Play Video

CppCon 2015: T. Winters & H. Wright “All Your Tests are Terrible..."

2015/10/31
CppCon 2015: Fedor Pikus “The Unexceptional Exceptions"
Play Video

CppCon 2015: Fedor Pikus “The Unexceptional Exceptions"

2015/10/17
CppCon 2015: Pablo Halpern “Work Stealing"
Play Video

CppCon 2015: Pablo Halpern “Work Stealing"

2015/10/16
CppCon 2016: John Lakos “Advanced Levelization Techniques (part 1 of 3)"
Play Video

CppCon 2016: John Lakos “Advanced Levelization Techniques (part 1 of 3)"

2016/10/07
CppCon 2014: Walter E. Brown "Modern Template Metaprogramming: A Compendium, Part I"
Play Video

CppCon 2014: Walter E. Brown "Modern Template Metaprogramming: A Compendium, Part I"

2014/10/17
Engineering Distinguished Speaker Series: Howard Hinnant
Play Video

Engineering Distinguished Speaker Series: Howard Hinnant

2016/09/19
CppCon 2017: Piotr Padlewski “Undefined Behaviour is awesome!”
Play Video

CppCon 2017: Piotr Padlewski “Undefined Behaviour is awesome!”

2017/10/27
CppCon 2015: Titus Winters "Lessons in Sustainability...”
Play Video

CppCon 2015: Titus Winters "Lessons in Sustainability...”

2015/10/13
CppCon 2017: Andrew Sutton “Meta”
Play Video

CppCon 2017: Andrew Sutton “Meta”

2017/10/21
CppCon 2017: Michael Park “Enhanced Support for Value Semantics in C++17”
Play Video

CppCon 2017: Michael Park “Enhanced Support for Value Semantics in C++17”

2017/10/06
CppCon 2015: Barbara Geller & Ansel Sermersheim “CopperSpice: A Pure C++ GUI Library"
Play Video

CppCon 2015: Barbara Geller & Ansel Sermersheim “CopperSpice: A Pure C++ GUI Library"

2015/10/20
CppCon 2015: Robert Ramey “Boost Units Library for Correct Code"
Play Video

CppCon 2015: Robert Ramey “Boost Units Library for Correct Code"

2015/10/16
CppCon 2015: Neil MacIntosh “Static Analysis and C++: More Than Lint"
Play Video

CppCon 2015: Neil MacIntosh “Static Analysis and C++: More Than Lint"

2015/10/17
CppCon 2017: Marshall Clow “Customizing the Standard Containers”
Play Video

CppCon 2017: Marshall Clow “Customizing the Standard Containers”

2017/10/17
CppCon 2015: Scott Schurr “constexpr: Applications"
Play Video

CppCon 2015: Scott Schurr “constexpr: Applications"

2015/10/13
CppCon 2014: John Lakos "Defensive Programming Done Right, Part II"
Play Video

CppCon 2014: John Lakos "Defensive Programming Done Right, Part II"

2014/10/15
CppCon 2017: Scott Jones & Kenny Kerr  “C++/WinRT and the Future of C++ on Windows”
Play Video

CppCon 2017: Scott Jones & Kenny Kerr “C++/WinRT and the Future of C++ on Windows”

2017/10/20
CppCon 2015: Jason Turner “The Current State of (free) Static Analysis"
Play Video

CppCon 2015: Jason Turner “The Current State of (free) Static Analysis"

2015/10/17
CppCon 2015: Pedro Ramalhete “How to make your data structures wait-free for reads"
Play Video

CppCon 2015: Pedro Ramalhete “How to make your data structures wait-free for reads"

2015/10/17
CppCon 2015: Gor Nishanov “C++ Coroutines - a negative overhead abstraction"
Play Video

CppCon 2015: Gor Nishanov “C++ Coroutines - a negative overhead abstraction"

2015/10/17
John Lakos: Large-Scale C++: Advanced Levelization Techniques, Part I
Play Video

John Lakos: Large-Scale C++: Advanced Levelization Techniques, Part I

2016/02/16
CppCon 2015: Howard Hinnant “A C++14 approach to dates and times"
Play Video

CppCon 2015: Howard Hinnant “A C++14 approach to dates and times"

2015/10/19
CppCon 2015: Huu Nguyen "C++ Requests - Curl for People"
Play Video

CppCon 2015: Huu Nguyen "C++ Requests - Curl for People"

2015/10/21
CppCon 2017: Michael Spencer “My Little Object File: How Linkers Implement C++”
Play Video

CppCon 2017: Michael Spencer “My Little Object File: How Linkers Implement C++”

2017/10/20
CppCon 2017: Gennadiy Rozental “How to break an ABI and keep your users happy”
Play Video

CppCon 2017: Gennadiy Rozental “How to break an ABI and keep your users happy”

2017/10/26
CppCon 2015: Andrei Alexandrescu “Declarative Control Flow"
Play Video

CppCon 2015: Andrei Alexandrescu “Declarative Control Flow"

2015/10/18
CppCon 2017: John D. Woolverton “C Pointers”
Play Video

CppCon 2017: John D. Woolverton “C Pointers”

2017/10/17
CppCon 2015: Peter Sommerlad “Variadic Templates in C++11 / C++14 - An Introduction”
Play Video

CppCon 2015: Peter Sommerlad “Variadic Templates in C++11 / C++14 - An Introduction”

2015/10/09
CppCon 2015: Phil Nash “Test Driven C++ with Catch”
Play Video

CppCon 2015: Phil Nash “Test Driven C++ with Catch”

2015/10/13
CppCon 2017: Rich Geldreich & Stephanie Hurlburt  “The Future of Texture Compression”
Play Video

CppCon 2017: Rich Geldreich & Stephanie Hurlburt “The Future of Texture Compression”

2017/10/17
CppCon 2017: “C++17 ParallelSTL: A Standardization Experience Report for CPU and GPU on SYCL”
Play Video

CppCon 2017: “C++17 ParallelSTL: A Standardization Experience Report for CPU and GPU on SYCL”

2017/10/26
CppCon 2015: Matt Hargett “Advanced Unit Testing in C & C++”
Play Video

CppCon 2015: Matt Hargett “Advanced Unit Testing in C & C++”

2015/10/09
Syntax vs Semantics (Philosophical Distinctions)
Play Video

Syntax vs Semantics (Philosophical Distinctions)

2015/09/17
An interview with John Lakos
Play Video

An interview with John Lakos

2015/06/11
C++ 11: Rvalue Reference -- Move Semantics
Play Video

C++ 11: Rvalue Reference -- Move Semantics

2014/01/29
CppCon 2017: Louis Dionne “Runtime Polymorphism: Back to the Basics”
Play Video

CppCon 2017: Louis Dionne “Runtime Polymorphism: Back to the Basics”

2017/11/04
CppCon 2017: Nathan Sidwell “Adding C++ modules-ts to the GNU Compiler”
Play Video

CppCon 2017: Nathan Sidwell “Adding C++ modules-ts to the GNU Compiler”

2017/10/20
CppCon 2015: Piotr Padlewski "C++ WAT"
Play Video

CppCon 2015: Piotr Padlewski "C++ WAT"

2015/10/21
Value Semantics and Range Algorithms - Composability and Efficiency
Play Video

Value Semantics and Range Algorithms - Composability and Efficiency

2014/08/04
CppCon 2017: Tobias Fuchs “Multidimensional Index Sets for Data Locality in HPC Applications”
Play Video

CppCon 2017: Tobias Fuchs “Multidimensional Index Sets for Data Locality in HPC Applications”

2017/10/17
Powered by YouTube

Disclaimer

None of the audio/visual content is hosted on this site. All media is embedded from other sites such as GoogleVideo, YouTube etc. Therefore, this site has no control over the copyright issues of the streaming media.

All issues concerning copyright violations should be aimed at the sites hosting the material. This site does not host any of the streaming media and the owner has not uploaded any of the material to the video hosting servers. Anyone can find the same content on Google Video or YouTube by themselves.

The owner of this site cannot know which documentaries are in public domain, which has been uploaded to e.g. YouTube by the owner and which has been uploaded without permission. The copyright owner must contact the source if he wants his material off the Internet completely.