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

02/02/2019
by   Joe Politz, et al.
0

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. This simplifies reflecting on program behavior, and eliminates many unnecessary curricular dependencies imposed by the old design. This work has been implemented in the Pyret programming language. The separation of concerns has enabled new curricula, such as the Bootstrap:Physics curriculum, to take flight. Thousands of students use this new mechanism every year. We believe that reducing impedance mismatches improves their educational experience.

READ FULL TEXT

page 4

page 10

page 12

page 13

page 14

page 16

page 27

research
03/29/2018

The process of purely event-driven programs

Using process algebra, this paper describes the formalisation of the pro...
research
07/07/2019

A Bridge Anchored on Both Sides: Formal Deduction in Introductory CS, and Code Proofs in Discrete Math

There is a sharp disconnect between the programming and mathematical por...
research
05/11/2021

Exploring a Handwriting Programming Language for Educational Robots

Recently, introducing computer science and educational robots in compuls...
research
10/24/2017

First Programming Language: Visual or Textual?

In modern day society, the ability to code is a highly desirable skill. ...
research
02/19/2018

CalcuList: a Functional Language Extended with Imperative Features

CalcuList (Calculator with List manipulation), is an educational languag...
research
08/02/2018

Regulating Access to System Sensors in Cooperating Programs

Modern operating systems such as Android, iOS, Windows Phone, and Chrome...
research
08/01/2021

SignalGP-Lite: Event Driven Genetic Programming Library for Large-Scale Artificial Life Applications

Event-driven genetic programming representations have been shown to outp...

Please sign up or login with your details

Forgot password? Click here to reset