[racket] Programmatically start a big-bang?

From: Stephen Bloch (bloch at adelphi.edu)
Date: Sun Apr 21 19:27:31 EDT 2013

Then there's the way I did it under the influence of macrophobia (I knew macros were valuable and important, but felt I didn't have time to learn them before the due date for the project at hand):

Define on-tick, on-draw, etc. as constructors for a variety of structs that each have a single field of type "function".  Big-bang then became a variable-arity function that simply checked its arguments at run-time to see whether they were of any of those struct types.  It didn't give quite as good error messages as the macro version, but it worked perfectly well and I could understand it without worrying about macros :-)

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.