8 ms·
>For methods modifying internal state, I think you’ll have a hard time with the assertion that “purity is easier to reason about”. Modeling the method that mod
by madmax96 3y ago
>For methods modifying internal state, I think you’ll have a hard time with the assertion that “purity is easier to reason about”.
Modeling the method that modifies internal state as a function from old state to new state is the simplest way to accomplish this goal. I.e., preconditions and postconditions.