Here is my simple example
I define a map of mutable collection of dictionaries.
changeMap is normal modification.
getMap, if I need to return this data. I need to redefine an immutable dictionary collection and return it.
This way of writing is very unfriendly. Is there any way to directly turn the entire collection into an immutable one.
So far I haven’t found a way, the Array has the kind I want. Freeze, thaw, but only for Array.
This example only shows 4 attributes. If the business is too large, there are more than a dozen, and the business code at this time is very cumbersome.