3 ms·
Global mutable state is still terrible design unless actually necessary. Any function at all in your entire program can change the state of the thing which make
by Slyfox33 2y ago
Global mutable state is still terrible design unless actually necessary. Any function at all in your entire program can change the state of the thing which makes it very difficult to debug and reason about.
- flohofwoe 2y agoIn all languages I'm aware of you can limit the visibility of global variables to the current compilation unit / source file, it's still 'mutable global state' from the pov of functions in that file, but non-existent for anything outside the source file.