[<<][plt][>>][..]
Fri Sep 4 12:46:50 CEST 2009

Direct staging vs. the 'eval trick

In [1] and related posts I described a trick to express the following
code staging flow:

     stx -+-> value ---\
          |            |
          |            v
          \--------> modified-stx

I.e: the original syntax `stx' is first interpreted to yield `value',
which is then combined with the original `stx' to yield
`modified-stx'.

The reason for doing this was to be able to use Scheme's binding
operations to create a network (the value) which can then be used to
process `stx'.  (For the data flow language DFL).

In the staged constraint propagation language (CPL) I'm taking a more
traditional direct staging approach:

     stx ---> modified-stx

by interpreting `stx' manually: the network is builtup sequentially
from a set of nodes and a set of rules.  

I wonder if there is some more fundamental reason i ``shouldn't'' use
the former approach.  One part of me says the former approach is just
a way to implement the latter (the cross-stage mixing performed using
a ``hygienic eval'' implemented with a staged macro doesn't have any
side-effects).

Anyways..  Unresolved but probably not important.  I have the feeling
this is quite an arbitrary artifact that is a consequence of
implementing some functionality as macros, and other as functions
operating on syntax..

[1] entry://20090722-091734



[Reply][About]
[<<][plt][>>][..]