Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Looking at Immutable Data with Optics

Looking at Immutable Data with Optics

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.

47 Degrees Academy

July 14, 2020
Tweet

More Decks by 47 Degrees Academy

Other Decks in Programming

Transcript

  1. Q&A