arrow-kt / arrow

Λrrow - Functional companion to Kotlin's Standard Library
http://arrow-kt.io
Other
6.13k stars 442 forks source link

Arrow Fx DSL #3443

Open nomisRev opened 3 months ago

nomisRev commented 3 months ago

This PR proposes a new module for Arrow Fx Coroutines, which covers the existing behavior in Arrow Fx but in a generalised way using DSLs.

All the above non-DSL variants, can be implemented by their DSL variations. Simplifying the internals of Arrow Fx Coroutines. The idea behind this is future proofing, since my ambition for 3.0 is to split Raise and the typed error handling DSL from Arrow Core such that users can rely on only the DSL after 3.0. That should be do-able with only a single binary breakage in Arrow Core, so 3.0 should be source compatible, and 99% binary compatible once Context Parameters are released.

Investigate if we need, or want, <E> variants when inside Raise<E>.

serras commented 3 months ago

One DSL to rule them all and in the coroutines bind them?

nomisRev commented 3 months ago

"It all began with the forging of the Great" DSLs 🤣