[plt-scheme] Re: [plt-edu] the universe teachpack

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Mar 25 05:21:53 EDT 2009

On Mar 24, 2009, at 10:40 PM, Stephen Bloch wrote:

> 1) Sometimes it's really useful to be able to end an animation from  
> within a key, tick, or mouse handler.  Sure, you can do this by  
> redefining the world type to have a 'quitting case, which you  
> detect in a stop-when handler, but it's so much simpler to just  
> call end-of-time.  Could we please have end-of-time back, in  
> addition to stop-when?

No, it violates the idea that BSL should be just 8th grade school  
mathematics. (I don't want to introduce effects this way.)


> 2) What do we gain (pedagogically) by insisting on the distinction  
> between scenes and images?

This will disappear when Robby revises images.ss.

> It's not clear from the documentation what happens in universe if  
> you call big-bang with no redraw handler;

It doesn't draw :-) And it's a one-liner to test: (big-bang 1 (on- 
tick add1)) is an infinite loop

> I guess I could give absolute-beginning students the boilerplate  
> code "(on-draw identity)"

The state of the world should not be a scene so using identity would  
not create a scene. Use run-simulation for simulations.

-- Matthias



Posted on the users mailing list.