Lecture: C++ Fundamentals: Value Types

A guide to implementing a class in C++ that models an abstract set of values, like int models whole numbers and string models the set of arbitrary character sequences. The usefulness of such “value types” is motivated through value semantics in C++ and how we reason about the meaning of a program.
This talk will discuss how to implement C++ classes that represent elements of a mathematical set of values. Known applications of this concept are the 'int' to model whole numbers and 'string' to model a sequence of characters, or, more theoretically speaking, finite words over some alphabet.
These two types are clearly the bread and butter of the working C++ engineer. However, programs also define their own classes to model domain-specific concepts. Often enough, these custom classes mix value representation with behaviour and business logic, like a configuration class that can read itself from a file or that implements virtual functions for some purpose.
In this presentation, we'll focus on the value aspects by addressing the following: What is a value and how does value semantics help us understand programs? What is the difference between representation and value? How does the mathematical value guide our implementation for accessors, relational operators, and the rest? Clear-cut value types not only benefit our understanding of a program, but also increase testability, reuse, separation of concerns, and much more.
Info
Day:
2023-04-21
Start time:
11:00
Duration:
01:30
Room:
Bristol II / Bristol Suites
Track:
General C++
Links:
Feedback
Click here to let us know how you liked this event.
Concurrent Events
Speakers
![]() |
Frank Birbacher |