How to Use Dependency Injection in Functional Programming

preview_player
Показать описание
I'll show one of the problems Dependency Injection solves in Object Oriented Programming code bases, then show a similar technique in Functional code. You just use function arguments. Once you grok this, you'll be equipped to grok the more advanced partial application use.

Рекомендации по теме
Комментарии
Автор

This is so underrated!! This cleared up so much of my confusion when trying clean architecture.

johnjackson
Автор

Awesome video! More people should watch this. You made it very easy to understand. Keep up the good work.

vinicch
Автор

I type my functions in typescript to define the “algebra”.
Usually I make functions with parameters that return a function but I think I’ll just try your idea here or maybe define dependencies type but it could be so much.
What do you think about fp dependency injection using reader monad?

MohamedCherifBOUCHELAGHEMdz
Автор

Love your videos. I'm a big fan since your first javascript lessons.

peristiloperis
Автор

I thoroughly enjoyed this entire video. Very nice explanation of a ton of things, but one thing I noticed is you throw the word "deterministic" around a lot instead of something like "pure" when you mention side effects. Such as reading from disk maintaining a programs deterministic state. This doesn't really follow through, instead you should use the word "pure" because it makes more sense and it aligns with what you're teaching. Great video nevertheless.

aidiansvaant
Автор

Fluid and fast, love the video. But probably non-english speakers will have a hard time trying to follow.

solisarg
join shbcf.ru