3 ms·
Consider a very simple concept. Now one can have mutation by simply returning the mutated value which internally can be implemented as mutation since the type
by Blikkentrekker 6y ago
Consider a very simple concept.
Now one can have mutation by simply returning the mutated value which internally can be implemented as mutation since the type system guarantees that the original value never be used after.
Conceptually, it's purely functional programming where a function consumes a value and returns a new one, under the hood it's understood to be mutation which is possible due to these constraints.