Skip to content
0:00 / 0:00

#scala#project-loom#continuations

Martin Odersky DIRECT STYLE SCALA Scalar Conference 2023

SoftwareMill

3.7K subscribers • 18 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Martin Odersky, creator of Scala

Advanced. Deep dive for people who know the field.

14K views3 years ago2 recommendations

Programming languagesSystems programmingScalaConcurrency and parallelism

Martin Odersky discusses the future of direct-style concurrency, IO, and delimited continuations in Scala, enabled by virtual threads.

We have all gotten used to monads as the way to address asynchronous computation and reactive programming. This was certainly a technique of choice on the JVM as long as it lacked a fine grained fiber abstraction. But this is about to change. First, project Loom will offer some fibers in the form of virtual threads. Second, we now know a range of techniques to implement continuations efficiently. So the day might not be far where we can assume continuations or fibers on all platforms where Scala is running. But what will we do with the new abstractions? In my talk I'd like to take you on a tour of what that future could look like. Starting with the recently added boundary/break for error handling, we'll see strawman abstractions for suspensions and their applications. In particular, we'll see an outline of a potential future direct style concurrency and IO library with direct-style futures and channels as main abstractions. These are in turn instances of asynchronous sources, which provide a flexible yet simple way of composing computations. scalar-conf.com/ Scalar Conference 2023 powered by SoftwareMill #scalarconf

Why it's here

2 people recommend this

What people say. Recommended as an overview of how delimited continuations and direct-style concurrency are coming to Scala.

u/Sunscratchin r/scala • Recommends

Martin Odersky DIRECT STYLE SCALA Scalar Conference 2023

u/fredoverflowin r/ProgrammingLanguages • Recommends

Suspensions (delimited continuations) are coming to Scala

u/dernobin r/scala • Mentions

…eptions without Stacktraces. Measurements show, that this creates an overhead of ~5ns, which should be acceptable. Of course it won't work (and being dangerous) in lazy evaluated code (Futures, Lazy Collections, Effect Systems etc.). What do you think? *Disclaimer:* The base idea was already presented by Martin Odersky at Scalar Conference 2023 link to this video (which I rembered later in implementation) There is also an old thread.…