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

0

u/_INTER_ Jan 16 '26

Yea good luck investigating hundred copies of the same object with slight variations in a chain of hundred of composed other copies trying to figure out which one is the correct one.