3 ms·
How is immutability supposed to help mitigate these bugs? This seems like the programmer just not encoding the allowed state change accurately. In the real worl
by rowanG077 5y ago
How is immutability supposed to help mitigate these bugs? This seems like the programmer just not encoding the allowed state change accurately. In the real world(tm) you should always update the state either through functions that make sure you are not reaching undesirable states or encode you state at the type level. This is completely orthogonal to immutability though.