Two quick questions: 1) Where can I read about how...
# arrow
s
Two quick questions: 1) Where can I read about how Arrow optics compute over immutable data objects ? 2) what is the downside of using Reader monad for DI in comparison to framework like Dagger?
s
Arrow-optics has its own website since recently! šŸ™‚
I am hoping to revamp the docs soon, but that’s very time consuming šŸ˜ž If you have any questions, or are interessed in contributing to Optics I’d love to help you with anything šŸ™‚
This is a high level DSL build on top of Arrow Optics to work with Json. https://github.com/47deg/helios/tree/master/helios-optics
s
Thanks Simon! I wanna understand it’s internal working for now and will surely contribute once I get my head around this library. šŸ˜„
šŸ‘ 1
a
Related to Reader vs Dagger it's a tough comparison and would probably depend on the size of your project and personal taste
r
Does Reader provide compile-time errors?
a
yes, because is based on types and properties
there's an article on that from our amazing @Jorge Castillo -> https://jorgecastillo.dev/kotlin-dependency-injection-with-the-reader-monad
j
I wish there was a ā€œbald guy using a laptopā€ emoji
šŸ˜‚ 3
s
That’s a great article! I am just looking how will scoping work with Reader? How will this work with modularised apps?
s
You’re just scoping
val
,
fun
and
object
. So it works based on visibility modifiers.
No generated code around your dependencies just all plain library and user code
šŸ‘ 2
s
Yeah no generated code is a big win for us. Since doing a clean build takes ~36mins šŸ’€ and dagger is the first in our list that is decrease the speed.
check that as an alternative to DI frameworks
that’s the arrow-specific version