Hi!
I'm writing an application relying on snow for portability and I encountered today an issue with macros and eval. As you may know, EVAL behaves differently on different hosts (or its calling convention may vary). The following line is valid Gambit, yet invalid Gauche :
(eval 42)
However,
(eval 42 (interaction-environment))
seems ok whatever host I use. Yet, I'm wondering. Suppose I have the following code
(define-macro (foo bar) (eval '( ... )))
I have two choices here : either modify each call-site to use INTERACTION-ENVIRONMENT too, either, say, write a dummy snow package that provides snow-eval. I'd think of something like
(define (snow-eval expr) (cond-expand (gambit (eval expr)) (gauche (eval expr (interaction-environment))) ...))
And then replace each eval with a snow eval. But then, it seems that snow-eval isn't exported yet at macro-expansion time, and macro foo will complain about this.
I know that EVAL is not R4RS, and that R5RS wants it to have the second parameter, but yet, I think it shows a something quite tricky. Could snow'ed procedures be introduced to the macro world ?
Regards,
Adrien
Afficher les réponses par date
snow-users-list@iro.umontreal.ca