While it is perhaps the simplest way to invert dependencies, it is by far the least maintainable, the least configurable, the most prone to error, and eventually leads to a code base where dependencies simply cannot be visualized or tracked at all. One central module, the service locator itself, becomes a global dependency towards which all other modules direct themselves. Indeed, every class must direct themselves to this central unit. Does this not do the exact thing that you are attempting to avoid in dependency inversion?