While immutable data structures have a lot of benefits, accessing or modifying select parts of them can be annoying and full of boilerplate. The family of abstractions known as optics is one solution to this problem.
This talk will be a gentle introduction to optics through algebraic datatypes, as it turns out the two share a very close relationship. We’ll see how optics let us retrofit ADT interfaces onto any immutable data structure and how this provides a solution.
We’ll also talk about when optics are NOT the right answer and how to spot it.
voted / votable