Finance Certifications Goldman Sachs and Amazon Teams Trust
Free courses from frontend to fullstack and AI
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This introductory talk examines common uses of null in C++ and shows how references, value semantics, std::optional, and gsl::not_null can make missing values explicit and code safer to reason about.
Syllabus
Intro
Outline
Optional parameter
Late initialisation of member
Dereferencing is undefined behaviour
Unclear APIs
Why is static typing good?
What does null do to static typing?
Conflating notions
Values which can be missing
Techniques which allow for missing values
References over pointers
Values over pointers
Return values
Use the standard library
Maybe techniques are for maybe values
std::optional
Bug classification Where
Remaining pointers
Tackle maybe pointers
Tackle definite pointers
A bright future
Taught by
NDC Conferences