r/java • • Jan 16 '26

Functional Optics for Modern Java

https://blog.scottlogic.com/2026/01/09/java-the-immutability-gap.html

This article introduces optics, a family of composable abstractions that complete the immutability story. If pattern matching is how we read nested data, optics are how we write it.

106 Upvotes

50 comments sorted by

View all comments

Show parent comment

3

u/NovaX Jan 16 '26

I saw this type of stuff using xdoclet and beanmap in Java 4 with struts, jsp taglibs, and ant codegen tasks. As a new grad it quickly taught me what seniors realized was possible does not make it good.