|
|
|
|
|
by Silhouette
4083 days ago
|
|
I'm not sure if global mutable state is the same as the problem you point out though -- they do share a similar nature in the framing of dependencies, but they cause problems for different reasons. I agree, there are (at least) two distinct problems here. One is the existence of any implicit dependency because of global (or other broad) scope. This can create surprising spacial interactions in the code, making it harder to maintain. Another is the existence of mutable state. This can create surprising temporal interactions in the code, also making it harder to maintain. Loosely speaking, the danger from these effects multiplies. |
|