4 ms·
Oh, we cannot modify it, of course, but we are talking about the ways of producing a modified copy. The part of the argument about deep immutable structures is
by ivan_gammel 4y ago
Oh, we cannot modify it, of course, but we are talking about the ways of producing a modified copy.
The part of the argument about deep immutable structures is just a side remark: building them for modification is likely pointing to a problem with design, but that’s not the most important part.
The important part is that it is better to call business methods than externalizing the whole thing with deconstruction-modification-construction to a lens or some other code, when you have the full power of OOP to do it right.