3 ms·
You don't have to inject every dependency. If it's essentially a pure function, then just call that function (despite what old-school Java advocates, free funct
by Tainnor 3y ago
You don't have to inject every dependency. If it's essentially a pure function, then just call that function (despite what old-school Java advocates, free functions not tied to any object are fine).
I like dependency injection for things which have state and/or do IO and/or are expensive to construct.