How should context-escaping closures proceed?

  • Authors:
  • Dave Clarke;Pascal Costanza;Éric Tanter

  • Affiliations:
  • Katholieke Universiteit Leuven, Heverlee, Belgium;Vrije Universiteit Brussel, Brussels, Belgium;University of Chile, Santiago, Chile

  • Venue:
  • International Workshop on Context-Oriented Programming
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Context-oriented programming treats execution context explicitly and provides means for context-dependent adaptation at runtime. This is achieved, for example, using dynamic layer activation and contextual dispatch, where the context consists of a layer environment of a stack of active layers. Layers can adapt existing behaviour using proceed to access earlier activated layers. A problem arises when a call to proceed is made from within a closure that escapes the layer environment in which it was defined. It is not clear how to interpret proceed when the closure is subsequently applied in a different environment, because the layers it implicitly refers to (such as the original layer and/or the remaining layers) may no longer be active. In this paper, we describe this problem in detail and present some approaches for dealing with it, though ultimately we leave the question open.