trivrost
trivrost copied to clipboard
Phase out global state which needs initialization
Packages places and system contain global state which needs initialization. If initialization should ever fail to precede attempts to read it, hard to debug situations can arise. This should be refactored accordingly.
I tried removing global state from places by introducing a type List which contains all the fields. The amount of dependency injection which is required as a result is obscene without OOPing the hell out of the project. I currently see no way to implement this without making things worse.
Please close the issue if you do not see it doable right now.