[gambit-list] Macros and standard

Frederick LeMaster fred.lemaster at gmail.com
Fri Jul 30 17:05:25 EDT 2010


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 at 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:
> 1) 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 at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>
>



More information about the Gambit-list mailing list