Immutability is a concept supported in Kotlin that we usually implement using data classes and read only properties. Working with complex nested immutable structures can be a bit unfriendly with this language, given how nested calls to the copy constructor lead to hardly understandable codebases. In this talk, we will learn about optics, and how we can use and compose them to create highly reusable paths to update our nested data structures.
- Intro into Optics (Lens, Prism, Optional)
- Composing Optics
- Separating path vs logic (includes DSL)
- Outro: more optics (Traversal / Fold)
The video for this talk can be found here: https://www.youtube.com/watch?v=Q7GtlbAFGCc
This talk is part of the 47 Degrees Academy and was given by Simon Vergauwen.