3 ms·
Wouldn't it be much more appropriate to use immutable dictionaries in this case (or just not mutate them by convention)? Clojure does this and it seems to work
by YawningAngel 7y ago
Wouldn't it be much more appropriate to use immutable dictionaries in this case (or just not mutate them by convention)? Clojure does this and it seems to work pretty well.
- fuball63 7y agoYes but at that point, designing the structure of the dictionary and not allowing any down-stream method calls to alter it would require the same amount of work/forethought as actually redesigning the method to take X defined inputs and return Y values (and documenting it).
- pdimitar 7y agoInitial effort when refactoring might be the same -- or even bigger -- but it will save you time afterwards. The added peace of mind is not to be underestimated either.