BOB 2026

Encoding Effects as Capabilities
2026-03-13 , Talks 1
Language: English

Capabilities are an exciting development for the future of Scala, but are still misunderstood and a little abstract.

The purpose of this talk is to introduce the problem they are trying to solve and, step by step, demonstrate how they can be used to encode effects while allowing developers to use a direct style of programming.

By the end of the talk, we’ll have created a respectable set of effects and their handlers, and written an entire program using them to demonstrate how natural that style of programming can be.


3-5 take-home ideas:

Capabilities allow you to encode effects, much in the same way monads are used in a lot of modern programming.

They allow a direct style of programming - which, in plain English, means that you get the benefits of using monads (local reasoning, ...) without paying the syntactic and cognitive cost.

They rely on concepts of the Scala language (context functions and their properties) that are useful to learn about, even if you're not going to use capabilities.

Nicolas writes code for J.P. Morgan, where we use Scala to make some very complicated things seem very simple.

After too many years as a Java programmer and a thankfully brief stint in marketing, Nicolas discovered Functional Programming through Scala and fell in love. Since then, he's made it his mission to learn and explain the scary bits, by focusing on practical applications.

Nicolas is also the author and sole maintainer of a few useful OSS libraries, such as kantan.csv.