Alejandro Serrano Mena
Functional Trainer and Software Engineer at 47 Degrees
Alejandro is a trainer and software engineer specialized in functional programming. Before that, we was a PhD and lecturer at Utrecht University, working on compilers for functional languages. He has written three books, "Practical Haskell", "The Book of Monads", and "Haskell (Almost) Standard Libraries", and it's active in promoting functional programming and formal methods.
Functional Programming in Kotlin
Functional programming has been on the rise, given its advantages in code readability and maintenance. In this workshop, we’ll look at concepts from functional programming that are directly applicable to Kotlin code. We’ll use Arrow as a supporting library, which includes many useful types and extensions to make a functional style even more pleasant. This workshop covers:
How to model your domain using hierarchies of data classes. The importance of immutability and how it impacts your code style. How to approach validation in a more composable way. Keeping track of contexts and side effects. Making asynchronous code more resilient with Arrow Fx.
Nicer data transformation with KopyKat and Optics
Data classes are incredibly useful when modeling our domain in an immutable way. The Kotlin compiler gives us many niceties, including 'copy' to create a new value based on a previous one. However, this 'copy' often falls short. In this talk we explore two alternatives: KopyKat, a plug-in to generate additional variations of 'copy', and Arrow Optics, a whole framework to transform this immutable data.