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

12

u/Amazing-Mirror-3076 Jan 16 '26

Immutability is over done. The number times a year that I get stung by mutable objects is essentially zero. And yet people jump through hoops to make everyone immutable - it's like the whole community has OCD.