|
|
|
|
|
by lolinder
464 days ago
|
|
Global state is a tool that will almost always lead to bad architecture in an app where architecture matters. I'm sure you can point to a counterexample or two where a set of devs managed to keep disciplined indefinitely, but that doesn't change the fact that allowing people to reach into a mutable variable from anywhere in the system enables trivially accessible spooky action at a distance, and spooky action at a distance is a recipe for disaster in a medium to large code base. In a project with more than a few people on it, your architecture will decay if it can decay. Avoiding global state removes one major source of potential decay. |
|