Mon Apr 28 21:58:10 EDT 2008

is it possible to implement mexit as a parameter?

as long as the parameters are retrieved inside the proper dynamic
context (not inside a mixer!) there should be no problem mixing
_immutable_ parameters with the stitch mechanism.

_mutable_ parameters are a problem when multiple executions are
desired. for mexit, this includes the exit label reference count
(number of exit points in a macro).

i.e.: suppose some macro executes multiple times, and on each
execution it calls mexit: the reference counts will add up.

but, if this effect can be kept local, there is really no problem: if
macros are wrapped, the state is only visible during execution of that
macro. i can imagine cases where this is violated:

   : bla ...  ( ... ; ... ) ... ;

the code between parens might be grabbed to be compiled in multiple
variants as part of an optimization: here ';' really shouldn't have
any side effects except for the result produced by the variant used.

so, on order to keep the design of the compiler simple, the following
requirements for macros are a good idea:

  * side-effect free wrt. code produced.

  * read-only parameterization allowed: not necessary to be
    referentially transparent

as an exception, side effects ARE allowed if they do not influence the
compilation results (i.e. logging). the reference count tracking of
exit label references violates this.