Event Loops as First-Class Values: A Case Study in Pedagogic Language Design

  title={Event Loops as First-Class Values: A Case Study in Pedagogic Language Design},
  author={Joe Gibbs Politz and Benjamin S. Lerner and Sorawee Porncharoenwase and Shriram Krishnamurthi},
The World model is an existing functional input-output mechanism for event-driven programming. It is used in numerous popular textbooks and curricular settings. The World model conflates two different tasks -- the definition of an event processor and its execution -- into one. This conflation imposes a significant (even unacceptable) burden on student users in several educational settings where we have tried to use it, e.g., for teaching physics. While it was tempting to pile on features to… 

Figures from this paper



Composable higher-order reactors as the basis for a live reactive programming environment

This work presents a new reactive language, called Haai, that is based on first-class higher-order reactors, which produces an infinite stream of values just like signals and behaviours in existing languages.

Worlds: Controlling the Scope of Side Effects

This paper investigates this idea by extending both JavaScript and Squeak Smalltalk with support for worlds, provides examples of some of the interesting idioms this construct makes possible, and formalizes the semantics of property/field lookup in the presence of worlds.

The ins and outs of Clean I/O

This paper shows that I/O can be incorporated in a functional programming language without loss of any of the generally accepted advantages of functional programming languages.

Programming Paradigms and Beyond

This chapter suggests the use of notional machines, i.e., human-accessible operational semantics, as a central organizing concept for understanding languages, whose complexity is understood well in the programming languages literature but is routinely overlooked in computing education.

DrScheme: a programming environment for Scheme

Beyond the ordinary programming environment tools, DrScheme provides an algebraic stepper, a context-sensitive syntax checker, and a static debugger that explains specific inferences in terms of a value-flow graph, selectively overlaid on the program text.

The black box inside the glass box: presenting computing concepts to novices

This work examines the simplicity and visibility of three systems, each designed to provide programming experience to different populations of novices, and introduces the term “commentary” which is the system's dynamic characterization of the notional machine, expressed in either text or pictures on the user's terminal.

Putting in all the stops: execution control for JavaScript

Stopify is a source-to-source compiler that extends JavaScript with debugging abstractions and blocking operations, and easily integrates with existing compilers, and a sampling-based technique to estimate program speed that outperforms other systems.

Isolates, channels, and event streams for composable distributed programming

Reactive isolates, proposed in this paper, simplify protocol composition with first-class typed channels and event streams and shows how to build reusable, composable distributed computing components in the new model.

Enriching the Internet By Acting and Reacting

This paper proposes a new programming model based on actors and reactors that encapsulate different parts of the application that is able to exploit some of the available concurrency while reducing the required amount of event-driven code.

Programming languages as operating systems (or revenge of the son of the lisp machine)

The MrEd virtual machine serves both as the implementation platform for the DrScheme programming environment, and as the underlying Scheme engine for executing expressions and programs entered into