Тип доклада: Доклад

Postmodern immutable data structures

  • Доклад на английском языке

The C++ elites have been talking for years about value semantics, immutability, and sharing by communicating. A better world without mutexes, races, observers, command patterns and so more lies ahead! When it comes to doing it in practice, it is not so easy. One of the main problem lies in our data structures...

Immutable data structures don't change their values. They are manipulated by producing new values. The old values remain there, and can be read safely from multiple threads without locks. They provide structural sharing, because new and old values can share common data — they are fast to compare and can keep a compact undo-history. As such, they are great for concurrent and interactive systems: they simplify the architecture of desktop software and allow servers to scale better. They are the secret sauce behind the success of Clojure and Scala, and even the JavaScript crowd is loving it via Facebook's Immutable.js.

We are presenting Immer, a C++ library implementing modern and efficient immutable data structures.

In this session, we will talk about the architectural benefits of immutability and show how a very efficient and powerful persistent vector type can be built using state-of-the-art structures (Relaxed Radix Balanced Trees). We will also show an example application (a text editor) built using the architectural style proposed here. Not only is its code extremely simple, it outperforms most similar programs. Don't believe it? Come and see!

Technologies presented:

  • #fp
  • #moderncpp
  • #postmoderncpp

Спикеры

Доклады