Raphael De Lio
Jan 19, 2024

--

I had been working with Kotlin for the past four years and this year I landed on a Java 21 project. We decided to use Java Records, but one of our struggles was reassigning fields. We ended up using Lombok annotation @Builder in our Java Records and then reassigning the fields with the "with" pattern. I see you mention the @Builder annotation here and I think it would be interesting if you could extend this article or write a sequence with the best practices to reassign fields or maybe explain why we shouldn't be doing it in the first place if that's the case. Thank you for sharing!

--

--

Raphael De Lio
Raphael De Lio

Written by Raphael De Lio

Software Engineer | Developer Advocate | International Conference Speaker | Tech Content Creator | Working @ Redis | https://linktr.ee/raphaeldelio

Responses (1)