6 ms·
Arrow Fx implement this idea for Kotlin -> https://arrow-kt.io/docs/fx/ https://arrow-kt.io/docs/fx/
by The_rationalist 6y ago
Arrow Fx implement this idea for Kotlin ->
https://arrow-kt.io/docs/fx/ https://arrow-kt.io/docs/fx/
- valenterry 6y agoIt only implements the first part, not the more difficult one of composing different kind of effects. Scala has a library for the difficult part, but I don't think it was very successful: https://github.com/atnos-org/eff https://github.com/atnos-org/eff
- atennapel 6y agoThere's also effekt for Scala: https://github.com/b-studios/scala-effekt https://github.com/b-studios/scala-effekt though it does not seem to be maintained.
- valenterry 6y agoYes - I think we can conclude that these techniques are both too complicated and not ergonomic enough as of now. If that does not work in Scala, it will work even less in Kotlin (where many people go when they find Scala too complex).
- atennapel 6y agoI think something like algebraic effects can definitely be ergonomic and understandable, but a language definitely has to be designed for it. Algebraic effects are like exceptions in a lot of ways, so I think people will be able to understand them. See Effekt [1] and Koka [2] for languages that are designed with them in mind. [1] https://effekt-lang.org/ https://effekt-lang.org/ [2] https://koka-lang.github.io/koka/doc/kokaspec.html https://koka-lang.github.io/koka/doc/kokaspec.html