Dotty Cps Async Save

experimental CPS transformer for dotty

Project README

🇺🇦 HELP UKRAINE

I'm the creator of this project. My country, Ukraine, is being invaded by the Russian Federation, right now. If you want to help my country to fight, consider donating to charity supporting Ukrainian army. More options is described on support ukraine site.

dotty-cps-async

This is the implementation of async/await transformation for Scala 3 (Dotty), based on an optimized version of CPS (Continuation Passing Style) transformation, where the continuation is ‘pushed’ to the monad.

Highlights

  • Full support of all Scala language constructs in async/await block.
  • Pluggable monad interface:
    • An await monad can be any trait for which it is possible to implement CpsAsyncMonad type class. You can provide those methods for your favorite monad.
  • Limited support of high-order functions:
    • urls.map(fetchData(_))(await _ ) is an idiomatic way to fetch data for all items in parallel.
    • An application developer or library author can provide 'shifted' implementation of the own high-order functions.
  • Optional features, which enhance ergonomics in some cases, such as automatic coloring and handling discarded values
  • Optional SIP-22 compatible API.

For more details, please, read the documentation at https://rssh.github.io/dotty-cps-async/.

Presentations

Open Source Agenda is not affiliated with "Dotty Cps Async" Project. README Source: rssh/dotty-cps-async
Stars
170
Open Issues
2
Last Commit
1 week ago
License

Open Source Agenda Badge

Open Source Agenda Rating