[plt-scheme] [ANN] Heist: a Scheme interpreter in Ruby

From: James Coglan (jcoglan at googlemail.com)
Date: Wed Feb 25 03:43:15 EST 2009

2009/2/25 Shriram Krishnamurthi <sk at cs.brown.edu>

> Presumably you mean it extends the closure of its body (otherwise
> you'd have dynamic scope).  In that case, you're doing what is known
> as trampolining.  Nice to discover it for yourself!  But it's VERY
> different from continuation-passing style.  (If you really want your
> eyes to glaze over, you can read the paper entitled "Trampolined
> Style" (Google for it).)


Yes -- each function keeps a reference to the scope where it is defined, and
extends that scope when called so scoping is lexical. Thanks for the
clarification; I've seen the terms CPS and trampolining come up in other
people's implementations but haven't been able to read enough yet to know
exactly what trampolining is. I'm familiar enough with CPS since I write a
lot of JavaScript (where you have events, async IO, animations that all make
use of 'continuation' functions as callbacks) but can't immediately see how
to convert my whole interpreter to that style.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090225/8c0211a7/attachment.html>

Posted on the users mailing list.