big-bang
programs workIt turns out that understanding how big-bang
works is harder than I thought. A key concept that’s not obvious is that big-bang
does a lot of the work for you. Your job is
To design the WorldState
To explain how to render the WorldState as an image
To create the first WorldState
To define functions that big-bang
can use to change one WorldState into another
After that, big-bang
does all the work of keeping track of the mouse, changing one state into another, and drawing the state as a kind of animated flip book.
I’ve been told by the Big Chief Racket that the Racket Documentation is not the best way to learn big-bang
. Here are some better places to get information:
Interactive programs presents some simple big-bang
examples, but it does not explain systematically what big-bang
does.
Designing World Programs, especially Figure 10, systematically outlines the structure of every program that uses big-bang
, and it explains what big-bang
does with each piece of this structure.
A Note on Mice and Characters explains mouse-event handlers and keyboard-event handlers.