Sat Sep 13 10:16:27 CEST 2008


* Trying to re-implement this:


     We implement the very clever suggestion by Chung-chieh Shan and
     represent a staged expression such as .<(fun x -> x + 1) 3>. by
     the sexp-generating expression `(,(let ((x (gensym))) `(lambda
     (,x) (+ ,x 1))) 3) which evaluates to the S-expression ((lambda
     (x_1) (+ x_1 1)) 3). Thus bracket is a complex macro that
     transforms its body to the sexp-generating expression, keeping
     track of the levels of brackets and escapes.

The CEK machine: code, environment, continuation. ?

* Trying to find the key points of difference between MetaML and
  Staapl.  This is quite difficult, because there is no clear analogy
  of "code object" in Staapl.  There are two: low level stack machine
  code, and anything Scheme (including Coma code), which represents a
  stack machine code transformer.  The presence of partial evaluation
  makes switching between these two straightforward, but also a bit

  1. Bracket == Quasiquote in Staapl, because template code cannot
     generate new binding constructs.  This makes things simpler.

  2. Code objects are opaque (implemented as machine code transformers
     closed over lexical Scheme environment) instead of abstract
     syntax trees.  This allows one to never have to leave the
     semantics of generators, and Scheme -> Coma translation isn't
     really staging, but namespace mixing.