Squaring the circle: value-oriented design in an object-oriented system

Speaker: Juan Pedro BolĂ­var Puente

Audience level: Beginner | Intermediate | Advanced

Value-oriented design reconciles functional and procedural programming by focusing on value semantics. Like functional programming, it promotes local reasoning and composition—it is however pragmatic and can be implemented in idiomatic C++. In previous talks, I have discussed how immutable data-structures help use value semantics at scale, and how the Unidirectional Data-flow Architecture (Redux, Elm) provide a solid foundation for designing interactive software based on values and functions.

However, we rarely have the luxury of starting from scratch. We are often embedded in legacy codebases with Frankensteinian designs crystalized over decades of multi-paradigm evolution. Also, it's hard to build serious interactive software without frameworks like Qt or Juce that, with all its power, also impose a Javaish object-oriented approach at the boundaries of our system.

In this talk, we will present a new open-source library of _cursors_. Cursors are inspired by functional lenses and reactive streams to provide composable and modular fasades to "single atom" value storages. We will see how this can be used to navigate the tension between object-oriented and value-oriented design, and build an example interactive application using Qt and QML against a value-based data-model.