Okay, so I had not understood the sense of "non hygienic".
Once compiled all your scheme code can play together nicely.
But what if I run all the code with the interpreter?
And why is define-syntax deactivated by default?
The idea is that I think it is a good habit when programming to learn the standard, and then use extensions to carry out the things which can't be done (or can't easily be done) with the standard.
2010/7/30 Frederick LeMaster fred.lemaster@gmail.com
First off, define-macro predates define-syntax. Also, sometimes you need a macro system that is nonhygenic, such as when you want to inject new symbols into the environment. Once compiled all your scheme code can play together nicely.
On Fri, Jul 30, 2010 at 1:50 PM, Yves Parès limestrael@gmail.com wrote:
Hello!
I'm new to scheme and gambit. I've read "A tour of scheme in Gambit", and now I'm learning the language through "The scheme programming language" (http://www.scheme.com/tspl3/). My question concerns define-syntax VS define-macro. If I understood well, the first is standard scheme (*) whereas the latter
is
not. Besides, "A tour of scheme in Gambit" qualifies define-macro as "unhygienic" (**). Moreover (as I am from Haskell), I find
define-syntax's
pattern-matching simpler. So:
- What is the point of define-macro? Why does "A tour of Scheme in
Gambit"
encourages to use it, since it doesn't detail define-syntax? 2) Why does gambit run by default in a non-standard mode (Gambit scheme,
gsc
-:S) in which define-syntax doesn't exist whereas it is standard? 3) I plan to use termite, which uses Gambit Scheme and not standard
scheme
(gsc -:s). Can gambit scheme code call to procedures written in standard scheme?
Thanks!
(*) By 'standard' I mean R5RS. (**) Word which, from my newbie point of view, kind of sounds like "evil"
or
"don't-you-touch-it".
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list