Kyo is a next-generation effect system that introduces an approach based on algebraic effects to deliver straightforward APIs in the pure Functional Programming paradigm. Unlike similar solutions, Kyo achieves this without inundating developers with esoteric concepts from Category Theory or using cryptic symbolic operators. This results in a development experience that is both intuitive and robust.
Kyo generalizes the innovative effect rotation mechanism introduced by ZIO. While ZIO restricts effects to two channels, namely dependency injection and short-circuiting, Kyo allows for an arbitrary number of effectful channels. This enhancement offers developers greater flexibility in effect management and simplifies Kyo's internal codebase through more principled design patterns.
In addition to this novel approach to effect handling, Kyo provides seamless direct syntax inspired by Monadless and a comprehensive set of built-in effects like Aborts for short-circuiting, Envs for dependency injection, and Fibers for green threads with fine-grained uncooperative preemption.
After over two years in development, the first public release of the project will be made during Functional Scala 2023. Attendees will also be treated to benchmark results that showcase Kyo's unparalleled performance.
10. A decade working on
large-scale systems
● SoundCloud, Twitter, Nubank
● Delivered major performance
optimizations for Finagle, Twitter
Future, Stitch, Graal, Clojure
● Saw hundreds of crashes
Scala ♥ Graal
ScalaMatsuri 2019
https://youtu.be/a6dK3eXhO7k?si=T775S1sKFu5B4wSf
17. ZIO[R, E, A]
type IO[+E, +A] = ZIO[Any, E, A]
type Task[+A] = ZIO[Any, Throwable, A]
type RIO[-R, +A] = ZIO[R, Throwable, A]
type UIO[+A] = ZIO[Any, Nothing, A]
type URIO[-R, +A] = ZIO[R, Nothing, A]
18. ZIO[R, E, A]
Do we really need a fixed arity?
Why assume the computation uses IO and Async?
Why only dependency injection and short-circuiting?
What if we could express an unbounded number of effects?
90. Caprese
Kyo delivers Caprese’s
key promises
without language changes,
with a complete set of
effects
and next-level
performance
in Scala 2, 3, and JS
91. Caprese
Kyo delivers Caprese’s
key promises
without language changes,
with a complete set of
effects
and next-level performance
in Scala 2, 3, and JS
today
92. CREDITS: This presentation template was created
by Slidesgo, and includes icons by Flaticon and
infographics & images by Freepik
Thanks!
Any questions?
https://getkyo.io
https://dev.to/fwbrasil
@fbrasisil