Replies: 1 comment
-
FWIW I have a registry project with the kind of injection you describe. It’s critical for a larger effort I have in mind. I’m investigating re-homing my stuff atop svcs… going through a gap analysis now to see which of my darlings (features) to kill. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As it just came up in #86, I use a pattern similar to this all the time:
svcs will always be non-magical by default, but I guess nothing speaks against adding a helper that makes the lambda superfluous by looking at the type hints of the factory and calling
svcs_container.(a)get
on the required types automatically:Since this would only be a helper, it wouldn't also have the pressure to implement all edge cases because the escape hatch of just writing your own lambda is always there.
Beta Was this translation helpful? Give feedback.
All reactions