[plt-scheme] Scheme board game, anyone?

From: John Clements (clements at brinckerhoff.org)
Date: Mon Mar 17 13:04:56 EDT 2008

On Mar 17, 2008, at 9:38 AM, Geoff Knauth wrote:

> Maybe off topic, but when I saw this, I thought, "Why isn't there a  
> Scheme version of this game?"  (Or is there?)
>
> C-jump is a neat idea, mapping something fun (downhill skiing) with  
> programming.  I look at this game and wonder what it would look like  
> in the wonderful world of continuations.

Well, I'm not saying you couldn't do it, but the game as designed is  
fairly antithetical to a functional approach. In particular,  
computation is accomplished almost entirely using mutation, and it  
appears that the state of a computation can be represented purely as a  
pair containing the location in the code (the pawn keeps track of  
this) and a value for 'x'. A scheme version of this would require you  
somehow to keep track of the computed values of lots of subexpressions. 
[*]

There's always Bret Victor's Alligators...

http://worrydream.com/AlligatorEggs/

John Clements


[*] Actually, I think this difference provides some insight into the  
differences between programming in a traditional imperative style and  
a functional one; in fortran, say, the computer keeps track of a  
relatively small (perhaps better to say "unstructured"?) number of  
things--a program counter, & values in memory.  In a functional  
approach, the context is structured and "keeps track of" the various  
pieces of the computation and the way they fit together, allowing the  
programmer to ignore everything other than "this one little bit".[**]

[**] The overuse of quotation marks in the prior sentences can  
reasonably be construed as uncertainty and/or insecurity on my part.   
Too bad.


> Begin forwarded message from Chase Turner:
>
>> Subject: Is there a Scheme version of this game?
>>
>> http://www.c-jump.com
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.