Event Loops as First-Class Values: A Case Study in Pedagogic Language Design
Joe Politz (University of California San Diego, United States),, Benjamin Lerner (Northeastern University, United States), Sorawee, Porncharoenwase (Brown University, United States), Shriram Krishnamurthi, (Brown University, United States)

TL;DR
This paper introduces a redesigned event-driven programming primitive called reactor, which separates event processing from execution, simplifying educational use and enabling new curricula in Pyret with improved student experience.
Contribution
The paper presents a novel reactor primitive that separates event processing from execution, improving pedagogic clarity and enabling new curricula in Pyret.
Findings
Thousands of students use the new mechanism annually.
The new design simplifies program reflection and control.
It reduces curricular dependencies and enhances educational effectiveness.
Abstract
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 address these issues, we instead used the Scheme language design dictum of removing weaknesses that made them seem necessary. By separating the two tasks above, we arrived at a slightly different primitive, the reactor, as our basis. This only defines the event processor, and a variety of execution operators dictate how it runs. The new design enables programmatic control over event-driven programs.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
