Stack-Copying Delimited Continuations for Scala Native

Scala, an industrial-strength functional and object-oriented programming language, is in need for an ergonomic approach to asynchronous programming. Project Loom provides direct-style concurrency to Scala on the JVM, which leaves its low-footprint high-performance backend Scala Native looking for an equivalent mechanism. We present a design and implementation of delimited continuations, a powerful control flow mechanism that provides the fundamental building block for direct-style concurrent and effectful programming, in Scala Native. Our implementation aims to preserve the unique advantages of the Native target: zero-cost C interoperability, runtime modularity and debugger compatibility. Through a detailed discussion of the implementation, we show that despite the limitations with stack address stability, it meets all the requirements of Scala Native while exhibiting comparable performance to our JVM counterpart.

Authors

Institutions

Publication Details

Published
2024-09-13
DOI
https://doi.org/10.1145/3679005.3685979
Citations
2
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.69
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Stack-Copying Delimited Continuations for Scala Native

Martin Odersky, Cao Nguyen Pham
2 citations
Logic, programming, and type systems
0.69
article

Stack-Copying Delimited Continuations for Scala Native

Martin Odersky, Cao Nguyen Pham
article en
2 citations

Abstract

Scala, an industrial-strength functional and object-oriented programming language, is in need for an ergonomic approach to asynchronous programming. Project Loom provides direct-style concurrency to Scala on the JVM, which leaves its low-footprint high-performance backend Scala Native looking for an equivalent mechanism. We present a design and implementation of delimited continuations, a powerful control flow mechanism that provides the fundamental building block for direct-style concurrent and effectful programming, in Scala Native. Our implementation aims to preserve the unique advantages of the Native target: zero-cost C interoperability, runtime modularity and debugger compatibility. Through a detailed discussion of the implementation, we show that despite the limitations with stack address stability, it meets all the requirements of Scala Native while exhibiting comparable performance to our JVM counterpart.

École Polytechnique Fédérale de Lausanne (CH)
Openalex Percentile: Top 24%
Logic, programming, and type systems
0.69
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Stack-Copying Delimited Continuations for Scala Native — Martin Odersky, Cao Nguyen Pham · (2024) | TGRS Research Map | TGRS