Immutable Objects Are Worth the Effort

Dan Goslen
Level Up Coding
Published in
6 min readMar 20, 2020

--

Photo by Quino Al on Unsplash

I have written before about how immutable builders are one of my favorite patterns for writing simple code. The pattern both forces you to think about what the object you are building needs before starting to build it, and it also removes the thinking of what constructors are available. Using tools like Lombok or even (the aptly named) immutables, you can easily create immutable objects and builders that have the same…

--

--

Jesus follower | Husband | Dad | Software engineer. Helping devs build better teams