|
|
|
|
|
by equark
5455 days ago
|
|
The correct way to deal with this is to realize you have a problem? I think the above comment is willing to admit a problem and is asking for a solution. What does TDD have to do with it? I'm also interested in hearing what is considered the best practice for things like passing around config options, an eventloop, or message bus. |
|
When you DO need global state, then a singleton object is a reasonable way to achieve it. But chances are fairly high that you don't.