Skip Navigation

Can someone explain to me the advantage of mutable objects?

It makes the code icky and hard to debug, and you can simply return new immutable objects for every state change.

EDIT: why not just create a new object and reassign variable to point to the new object

You're viewing a single thread.

27 comments
27 comments