We recently started the development of the next major version of Monocle, Monocle 3.x. In this post, I would like to explain our objectives and discuss some of the changes we intend to make.
Monocle 3.x will be a complete rewrite. It doesn't mean we will change everything, but we will question every aspect of the library: optics encoding, API, names, dependencies, etc. We defined the following objectives to help us make trade-offs in the new design:
- User-friendly interface. A user should be able to perform the most common actions without requiring in-depth knowledge of optics.
- Correctness. Optics follow certain essential principles. Those rules may not be intuitive, but without them, optics would not be a useful abstraction. The API should make it easy to follow those principles and avoid any undesired behaviours.
- Focus on Scala 3. We should design the API and include features such as they are suitable for Scala 3.
- Performance. Optics are slower than handwritten equivalent code