3 ms·
If you use a functional approach, you’re probably not mutating anything ever. That usually makes it trivial to find the source of a problem, because you can qui
by tobr 7y ago
If you use a functional approach, you’re probably not mutating anything ever. That usually makes it trivial to find the source of a problem, because you can quickly isolate it to a specific call stack.
> only the member functions of the class can change them. If the data gets mangled, you now have a very small set of places to look.
But probably anything could have called those mutating methods, so you still need to consider the entire codebase.
- AnimalMuppet 7y agoAnything could have called those mutating methods. But only those mutating methods could have put the object in an inconsistent state. I therefore have to fix the method that did that, and then let anything in the entire codebase freely call those methods.