2 ms·
State encapsulation is useful insofar as, if you wanted to write a proof that those pieces of state were only ever set correctly (eg using a statechart), you ca
by astrange 4y ago
State encapsulation is useful insofar as, if you wanted to write a proof that those pieces of state were only ever set correctly (eg using a statechart), you can now do that.
OOP languages never actually include this because nobody seems to particularly care if their code actually works.