[e-lang] StaticScope's hasMetaStateExpr definition
Mark S. Miller
markm at cs.jhu.edu
Sun Jul 23 00:12:54 EDT 2006
Kevin Reid wrote:
> Um. I seem to remember having discussed this already (not on the
> mailing list) after I asked the above question.
>
> My own proposal was that e`...` should return *unexpanded* (full E)
> node trees, thus allowing composition to happen before any expansion.
>
> If we do this, then only E and Kernel-E need exist.
Yes, that is reasonable and would work. There are two things that make me
uncomfortable with this:
1) Even trivially different syntactic forms of the "same" expression, such as
"x + y" vs "x.add(y)", would become distinct cases. OTOH, given a library of
source-to-source transformers, one could always first apply the transformer
that did the desired case folding. Since the programmer would then have full
flexibility in choosing which foldings they wish, maximum flexibility does
indeed argue for your suggestion.
2) If done in the style of the current ENode trees, it requires an explicitly
different kind of object per syntactic form. How many is it? Does this use
justify introducing all those kinds of objects? Perhaps a more
S-expression-ish representation, such as a term-tree, would be more
appropriate for this use?
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list