Please log in to watch this conference skillscast.
Optics (Lens, Traversal, etc.) are great abstractions that allow you to carry out complex state transformations using high-level design patterns. However, current optic libraries are restricted to work with in-memory data structures. In fact, this limitation might be one of the causes why optics are still fairly unknown by the community. Ideally, you should be able to exploit the optic expressiveness and composition capabilities when application state is handled, for instance, through relational databases, event sourcing or web services.
During this talk you will discover the so-called optic algebras, namely APIs that distill the algebraic essence of optics, and allows you to describe the data layer of your system in such a way that it can later be interpreted into particular data infrastructures -including, but not restricted to, immutable data structures.
You will then learn how optic algebras are implemented as natural transformations, which become essential to enable composability, analogously to the composition benefits that emerge with van laarhoven or profunctor representations at the in-memory level.
Finally, you will explore the architecture of Stateless, a Scala library that collects optic algebras and utilities to deal with them.
YOU MAY ALSO LIKE:
Lightning talk - Optic Algebras: Beyond Immutable Data Structures
Jesus is a PhD student at Habla Computing (Madrid), where he tries to take academic functional programming knowledge to the development of real-world systems in industry.