Hi all. This maybe a lame question, but how "heavy...
# arrow
d
Hi all. This maybe a lame question, but how "heavy" is Arrow Optics? I mean dependency wise, method count wise etc. We are evaluating adding it to our Android project (because copy-copy-copy... enough is enough!), but a bit afraid of Arrow size. Never used it before. Also, how will it be performance wise considering Android? I suspect everything will be OK.
r
Hi @dimsuz, Arrow optics only depends on arrow-core. The last version jar sizes can be seen here: https://repo1.maven.org/maven2/io/arrow-kt/arrow-optics/0.13.2/ https://repo1.maven.org/maven2/io/arrow-kt/arrow-core/0.13.2/ You can off course proguard, and when you generate Optics instead of generating all optics you can generate only lenses if all you care about is
copy
boilerplate. Arrow no longer depends on reflection tricks and proguard should be much easier. Take this with a grain of salt as I’m no Android dev.
core also depends on arrow-continuations but that is a small lib with a couple of types, other than that there should be no other dependencies.
d
great, thanks for clarification! Seems like it's really worth trying it.
s
Hey @dimsuz, it’s definitely worth looking into for Android especially if you practice DDD or use a or sealed/data classes.
You can also check out this Thread. https://kotlinlang.slack.com/archives/C5UPMM0A0/p1630776769069400 There is a way to tell the generator to not generate everything.
d
yep, sealed classes was what prompted this.
👍 1
s
Then you’re probably most interested in using the DSL, and then I advice to just let proguard do its thing get rid of he unused code from the generated code.
💪 1