Yes because injecting nowFn is trivial and not a case for DI.
Consider a database handle, or network socket, or http response payload. Clearly each class shouldn't be making its own version of those.
You're nitpicking for no good reason. You can create global handles to each of those items, and let them instantiate with the class or override them with a create function.
Dependency injection boils down the question of whether or not you can dynamically change a dependency at runtime.
loevborg|9 months ago
Charon77|9 months ago
cyanydeez|9 months ago
Dependency injection boils down the question of whether or not you can dynamically change a dependency at runtime.