returns icon indicating copy to clipboard operation
returns copied to clipboard

Explain difference between RequiresContext and IoC containers

Open thedrow opened this issue 5 years ago • 6 comments

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 avatar Apr 20 '20 09:04 thedrow

@thedrow does this article help? https://sobolevn.me/2020/02/typed-functional-dependency-injection

Maybe I can copy something from there.

sobolevn avatar Apr 20 '20 23:04 sobolevn

It's much better than the current documentation.

I still need an example where IoC is definitely better and how both can be combined.

thedrow avatar Apr 21 '20 07:04 thedrow

Ready to be reviewed, @thedrow!

Thanks a lot for raising this question.

sobolevn avatar May 17 '20 09:05 sobolevn

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.

thedrow avatar May 18 '20 08:05 thedrow

Ok, thank you!

sobolevn avatar May 18 '20 08:05 sobolevn

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. 🙂

sobolevn avatar Jun 02 '20 09:06 sobolevn