License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/DagRep.8.4.104
URN: urn:nbn:de:0030-drops-97623
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2018/9762/
Go back to Dagstuhl Reports


Chandrasekaran, Sivaramakrishnan Krishnamoorthy ; Leijen, Daan ; Pretnar, Matija ; Schrijvers, Tom
Weitere Beteiligte (Hrsg. etc.): Sivaramakrishnan Krishnamoorthy Chandrasekaran and Daan Leijen and Matija Pretnar and Tom Schrijvers

Algebraic Effect Handlers go Mainstream (Dagstuhl Seminar 18172)

pdf-format:
dagrep_v008_i004_p104_18172.pdf (10 MB)


Abstract

Languages like C\#, C++, or JavaScript support complex control flow statements like exception handling, iterators (yield), and even asynchrony (async/await) through special extensions. For exceptions, the runtime needs to be extended with exception handling stack frames. For iterators and asynchrony, the situation is more involved, as the compiler needs to turn regular code into stack restoring state machines. Furthermore, these features need to interact as expected, e.g. finally blocks must not be forgotten in the state machines for iterators. And all of this work needs to be done again for the next control flow abstraction that comes along.

Or we can use algebraic effect handlers! This single mechanism generalizes all the control flow abstractions listed above and more, composes freely, has simple operational semantics, and can be efficiently compiled, since there is just one mechanism that needs to be supported well. Handlers allow programmers to keep the code in direct-style, which is easy to reason about, and empower library writers to implement various high-level abstractions without special extensions.

The idea of algebraic effects handlers has already been experimented with in the form of small research languages and libraries in several mainstream languages, including OCaml, Haskell, Clojure, and Scala. The next step, and the aim of this seminar, is to seriously consider adoption by mainstream languages including both functional languages such as OCaml or Haskell, as well as languages like JavaScript and the JVM and .NET ecosystems.

BibTeX - Entry

@Article{chandrasekaran_et_al:DR:2018:9762,
  author =	{Sivaramakrishnan Krishnamoorthy Chandrasekaran and Daan Leijen and Matija Pretnar and Tom Schrijvers},
  title =	{{Algebraic Effect Handlers go Mainstream (Dagstuhl Seminar 18172)}},
  pages =	{104--125},
  journal =	{Dagstuhl Reports},
  ISSN =	{2192-5283},
  year =	{2018},
  volume =	{8},
  number =	{4},
  editor =	{Sivaramakrishnan Krishnamoorthy Chandrasekaran and Daan Leijen and Matija Pretnar and Tom Schrijvers},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2018/9762},
  URN =		{urn:nbn:de:0030-drops-97623},
  doi =		{10.4230/DagRep.8.4.104},
  annote =	{Keywords: algebraic effect handlers, implementation techniques, programming abstractions, programming languages}
}

Keywords: algebraic effect handlers, implementation techniques, programming abstractions, programming languages
Collection: Dagstuhl Reports, Volume 8, Issue 4
Issue Date: 2018
Date of publication: 08.10.2018


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI