Declarative Event-Oriented Programming

Conal Elliott

Microsoft Research

July, 2000

Abstract:

Events play an important role in the construction of most software that involves interaction or simulation. Typically, programmers make use of a fixed set of low level events supplied by a window system, possibly augmented with timers and UI components. Event handling generally involves some interpretation of these event occurrences, followed by external actions or modifications to program state.

It is possible to extend the event paradigm by using an algebra of events to synthesize new kinds of events tailored specifically for a domain or application. In turn, these new events may be used to synthesize yet others, and so on, to an arbitrarily sophisticated degree. This programming paradigm, which we call event-oriented programming, aids in the factoring of programs into understandable and reusable pieces.

We propose a declarative approach to event-oriented programming, based on a powerfully expressive event language with a lightweight notation. We illustrate this new approach through the design of an interactive curve editor.

In the Proceedings of the 2nd International Conference on Principles and Practice of Declarative Programming (PPDP 2000).  ©Copyright 2000 by ACM, Inc

Paper:

BibTeX:
@inproceedings{Elliott00:DEOP,
  author       = "Conal Elliott",
  title        = {Declarative Event-Oriented Programming},
  url          = {http://conal.net/papers/ppdp00/},
  booktitle    = "Principles and Practice of Declarative Programming",
  year         = "2000"
}

Animated figures

Code used in examples