Hi, Is ResourceScope something that replaces Koin...
# arrow
Hi, Is ResourceScope something that replaces Koin because of instantiation of classes in the
. I am trying to somewhat understand it. I am using Koin as DI in my backend, but am trying to migrate to somewhat somthing like the ktor-arrow-example.
ResourceScope doesn't replace Koin, you should rather see it as a replacement for lifecycle/resource management (it takes care of calling your finalizers when needed)
for dependencies we (as in "most arrow maintainers") try to stick with receivers (and context receivers in the future), as described in https://arrow-kt.io/learn/design/effects-contexts/
👍 1
Thnx Alejandro
Yes, we tend to stay away from "auto-injection" and we typically prefer to that ourselves manually. From experience I've found it results in the same amount of boilerplate, but better performance. No reflection, or compile/runtime tricks needed. It's also typically easier to follow since it's just vanilla Kotlin.
👍 1
arrow 1
Thnx for the insights