Data-Oriented Programming Version 1.1

Data-oriented programming models data as data: records for entities and sealed types for alternatives. Combined with pattern matching we can define operations on the data without overloading it with functionality.

An angled photo of a surface (a screen?) that shows white and red 0s and 1s on black with the digits strategically colored so the red ones form a heart

In data-oriented programming (DOP), we model data as data and polymorphic behavior with pattern matching. This talk will introduce the concept of DOP and its four principles:

  • model data immutably and transparently
  • model the data, the whole data, and nothing but the data
  • make illegal states unrepresentable
  • separate operations from data

We'll also explore how to use pattern matching as a safe, powerful, and maintainable mechanism for ad-hoc polymorphism on such data that lets us define operations without overloading the types with functionality. The talk ends with a juxtaposition to OOP, so you not only learn how to employ DOP but also when (not).

Slides

Here's the current version of the slides.

I also embedded them below. If they're focussed, you can navigate with arrow keys or swipes (they're two-dimensional, with chapters on the horizontal axis and chapter content layed out vertically). Use Page Up/Down for linearized order and ? for more shortcuts.

Video

Here's a good recording of the talk. I hope you'll like it.

Always embed videos

(and give me a cookie to remember - privacy policy)

Watch on YouTube

Past Presentations

I gave this talk a few times before. See below for links to slides (as they were at that very event), videos, and other information.

2024

2023

2022

2021