News for hackers. Stuff that matters.
Re:You probably don't need a dependency injection framework by loevborg on Monday May 26, 2025 @05:16AM (#44095515)
You're right, stateful dependencies like DB handles need to be passed in manually, and that's a bit of extra legwork you need to do.
Re:You probably don't need a dependency injection framework by Charon77 on Wednesday May 28, 2025 @11:40AM (#44117208)
Just use a static variable to the DB instance / pool, maybe using singletons, so everyone needing it have access.