trivrost icon indicating copy to clipboard operation
trivrost copied to clipboard

Phase out global state which needs initialization

Open MMulthaupt opened this issue 6 years ago • 2 comments

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.

MMulthaupt avatar Oct 08 '19 14:10 MMulthaupt

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.

MMulthaupt avatar Oct 23 '19 10:10 MMulthaupt

Please close the issue if you do not see it doable right now.

dragetd avatar Sep 13 '20 18:09 dragetd