Effects and resources: New frontiers for safe and expressive programming languages

April 27, 2023 at 6:00PM Slides

Abstract

Effect typing has seen increasing industrial adoption, mostly driven by async, reactive programming, and other concurrency patterns. But it is far from being a clear success. For instance, most approaches suffer from the so-called colored function problem which is due to a lack of effect polymorphism. Combining different effect types is also generally hard. No wonder then, that most effect typing systems are seen as annoyingly brittle and complex. This holds for checked exceptions in Java, as well as for async functions in Rust, or monadic effects systems like cats effect in Scala. 

Can we do better? It turns out that we can get effect polymorphism and flexible composition if we shift our viewpoint from (monadic) effects to object capabilities. To keep type safety, these capabilities need to be tracked in types. This is the approach we explore in Caprese. We model captured capabilities in an experimental Scala extension. Combined with delimited continuations, this allows the formulation of safe direct-style control effects which promise much improved composability and flexibility.

Bio

Martin Odersky heads the programming research group at EPFL. His research interests cover fundamental as well as applied aspects of programming languages. They include semantics, type systems, programming language design, and compiler construction. The main focus if his work lies in the integration of object-oriented and functional programming. His research thesis is that the two paradigms are just two sides of the same coin and should be unified as much as possible. To prove this he has experimented a number of language designs, from Pizza to GJ to Functional Nets. He has also influenced the development of Java as a co-designer of Java generics and as the original author of the current javac reference compiler. His current work concentrates on the Scala programming language, which unifies FP and OOP, while staying completely interoperable with Java and .NET. Martin Odersky got his doctorate from ETHZ, in 1989. He held research positions at the IBM T.J. Watson Research Center from 1989 and at Yale University from 1991. He was then a professor at the University of Karlsruhe from 1993 and at the University of South Australia from 1997. He joined EPFL as full professor in 1999. He is associate editor of the Journal of Functional Programming and member of IFIP WG 2.8. He was conference chair for ICFP 2000, and program chair for ECOOP 2004 as well as ETAPS/CC 2007.