Immutable Data Structures in C++
Alistair Fisher
This talk aims to offer a fresh perspective. Immutable data structures offer a solution to a challenge many developers face every day -- safety in a multithreaded environment. Unlike other data containers, they are thread safe by design and allow processes to be optimised through the sharing of data, with no risk to one another. They also make it easier to reason about and debug code, as the state of the program and its environment at each stage is persisted.
After discussing the unique value that these data structures can bring, we will turn to the traditional drawback of immutable data -- performance. We will examine some of the modern data structures developed for other programming languages, such as Clojure’s persistent vectors, and learn how these challenges can be overcome, sometimes to the point where what once was a weakness becomes a strength.