▲ | lmm 3 days ago | ||||||||||||||||
You can compose together a bunch of edit operations (an edit command, if you like) and apply them at once at the end, is that what you mean? | |||||||||||||||||
▲ | usrusr 2 days ago | parent [-] | ||||||||||||||||
Kind of. Can you use the interim state fork (original plus changes, not yet committed into a new immutable) as a "readable" type, the union of mutable and immutable variants? That would resolve choice dilemmas like the decision between mutable and immutable builders: keep the mutable where it is only used by the creating thread, materialise into an immutable when it needs to cross thread boundaries, fork where a thread needs to adapt a little and have all consumers typed to the readable version so that they can work with either, without requiring a new immutable. | |||||||||||||||||
|