Slides for my talk at Scala Italy 2018, in Florence. You can look at them online at https://systemfw.github.io/scala-italy-2018/#/ (use the spacebar to advance). The video for the talk is here.
A shared cache, a concurrent counter, a mutable DB connection: they are all common concerns in real-world applications that don’t fit the state monad model of returning a new copy of the state each time. Does this mean we should drop pure FP in those cases? Of course not!
This talk will show how mutable, shared, concurrent state is not only possible, but very simple in pure FP, whilst remaining composable and easy to reason about.
On one hand, we will see how to put together several concepts such as the IO type, cats-effect Ref, and Final Tagless. On the other, we’ll get at the very heart of what purity is all about.