Header Image

Renato Cavalcanti

Co-founder @ Strong[Typed]

Renato Cavalcanti is an independent Scala developer based in Belgium. Scala aficionado since 2009, he has been hacking in Scala and related technologies for fun and profit. He's the founder of BeScala, co-founder of Strong[Typed]​, author of Fun.CQRS and Lagom contributor.

The Ubiquitous Language in Functional Programming

Domain modelling in software is never pure. Next to the domain data and business logic there is a whole other universe of programing language constructs that we have to deal with (control structures, error handling, asynchronous computations, etc).

In Functional Programming in general and in Scala in particular, we have many data types that model general programming aspects. In DDD terms, we could say that they model the ubiquitous language of simple computations.

In this talk we will analyze a few well-known data types in Scala (Option, Either, Cats Validated, etc) and try to understand them from a Domain-Drive Design perspective. We also show some code samples to illustrate how they can be abused and how we can refactor them by creating new data types.