In other words, use a pure dependency-injection style, and ZERO globals.<p>I'm writing Python and some C++, and I have been doing this for maybe 5-6 years. It takes a little practice to structure your programs like this, but once you know how, it has a lot of benefits.<p>It's not really idiomatic in those communities either. Python and C++ Libraries use globals all the time, although I think it's becoming less common.<p>I guess Java programmers have been doing dependency injection for even longer. It probably became popular more than 10 years ago. But I'm not really sure how "pure" the Java ecosystem is. Singletons are banned under this style. Instead, a singleton is just an object you instantiate once in main(), and pass throughout the rest of your program.<p>I think the problem with Java is lack of free functions. Static methods confuse things too.<p>The pure-dependency injection style is basically <i>functional programming</i>, requiring state as an explicit parameter.