Why you should use immutable objects
Using immutable objects in your codebase has numerous benefits, especially when it comes to value objects. It makes your code easier to reason about, with less scope for side effects and subtle bugs. There are a few pitfalls to consider when designing immutable objects, and so using a 3rd party library to construct them can make your life much easier.