returns
returns copied to clipboard
Explain difference between RequiresContext and IoC containers
It is not clear from the documentation when you'd select to use RequiresContext instead of an IoC container.
We should explain the differences and demonstrate the different usecases where one is better over the other.
@thedrow does this article help? https://sobolevn.me/2020/02/typed-functional-dependency-injection
Maybe I can copy something from there.
It's much better than the current documentation.
I still need an example where IoC is definitely better and how both can be combined.
Ready to be reviewed, @thedrow!
Thanks a lot for raising this question.
I think you need an example that combines both approaches to show when each is needed.
The motivation isn't clear enough. "You want to use functional programming" isn't a motivation in my opinion. You need to show an example of how that's useful and more importantly when it is not useful. The same goes for IoC.
Ok, thank you!
I was not able to give a detailed example of DI and RequiresContext together. But, new iteration is ready.
This is the final one for this release. We can continue to work on docs later.
Right now I am really tired of working on returns. I want to release 0.14 and to have a rest from it. 🙂