DEV Community

Discussion on: Explain dependency injection like I'm five

Collapse
 
ben profile image
Ben Halpern

And this really helps mummy and daddy because you're not very good at cleaning or maintaining or watching over your toys. They'd rather not bother you with that stuff. Your "job" is to make use of the toys and have fun, not to build and take care of them.

If parents made their kids learn to create and clean their own toys, it might be possible to teach everyone to do this, but it would be easy to mess up, and they'd have a hard time being sure they got it right.