Reuse of continuation-based control-flow abstractions

  • Authors:
  • Steven te Brinke;Christoph Bockisch;Lodewijk Bergmans

  • Affiliations:
  • University of Twente, Enschede, Netherlands;University of Twente, Enschede, Netherlands;University of Twente, Enschede, Netherlands

  • Venue:
  • Proceedings of the 2nd workshop on Free composition @ onward! 2011
  • Year:
  • 2011

Quantified Score

Hi-index 0.01

Visualization

Abstract

It is commonly agreed that decomposing a software design according to the structure of the problem domain makes it easier to maintain and manage its complexity (e.g. [9]). To retain the resulting decomposition in the implementation, a programming language is needed that supports composition mechanisms that match the compositions in the problem domain. However, current programming languages only offer a small, fixed set of composition mechanisms. This leads to compromised implementations that either do not follow the decomposition from the design, or are cluttered with additional glue code. In this paper, we discuss the composition of control flow and investigate the hypothesis that continuations may be a suitable atomic core principle for offering a wide range of control-flow composition mechanisms in a form that does not compromise the structure and maintainability of the application. We present four variants of exception handling, which have been implemented using continuations and discuss their differences and commonalities. The results of this comparison are encouraging with respect to the expressiveness of continuations and reusability of implementations. But they also show that current language support for continuations leads to code replication and complex code.