Exit e-book
Show all chapters
09
Summary
09. 
Summary
Improve your focus with ZIO optics
09

Summary

In this document, you have seen the importance of optics, a very powerful tool in Functional Programming.  It allows us to work with deeply nested immutable data structures in a type-safe, principled, and composable way.  This will help us a lot when it comes to reducing boilerplate code in our applications. We’ve also seen that ZIO Optics provides a very powerful and flexible Optic data type, from which all the different kinds of optics are derived: Lens, Prism, Iso, Optional, and Traversal, including polymorphic versions.

But not only all that.  We’ve also seen how, thanks to its modular design, ZIO Optics provides not just Pure Optics but also Effectful and Transactional Optics, which enable a whole new space of possibilities by having optics that can perform ZIO effects or participate in ZIO STM transactions. Moreover, ZIO Optics is completely extensible, so it can be extended to interact with other effect systems such as Cats-Effect or Monix.

I hope the concepts and examples presented in this document will be useful to you, so you can start using ZIO Optics in your own applications!

Finally, take a look at this GitHub repository which contains all of the code samples shown above. You could also see this great Zymposium presentation by Adam Fraser and Kit Langton where they presented ZIO Optics for the very first time.

PREVIOUS
Chapter
08
NEXT
Chapter
010