Andy Wingo scripsit:

> > "3D" macros allow us to reify "compile-time" values into our source
> > code (think compiled procedures appearing as literal constants in
> > the operator position of a S-expr).
> 
> What Scheme implementations actually allow this? Guile used to, but then
> it grew a compiler.

Actually, if you quote the compiled procedure, most Schemes' "eval"
will allow it:

        > (define x `(car '(a . b)))
        > (set-car! x `(quote ,car))
        > (eval x (interaction-environment))
        a

I tested Chicken, SCM, Gauche, Gambit, Guile, Bigloo, and Chez
successfully.  MIT Scheme doesn't like "interaction-environment",
mzscheme doesn't like "set-car!", and Scheme48/scsh report vm-exceptions
when doing the set-car!.

-- 
John Cowan  [email protected]   http://ccil.org/~cowan
"The exception proves the rule."  Dimbulbs think: "Your counterexample proves
my theory."  Latin students think "'Probat' means 'tests': the exception puts
the rule to the proof."  But legal historians know it means "Evidence for an
exception is evidence of the existence of a rule in cases not excepted from."

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to