[gambit-list] Macros and standard

REPLeffect repleffect at gmail.com
Sun Aug 1 03:24:30 EDT 2010


On Fri, Jul 30, 2010 at 4:21 PM, Yves Parès <limestrael at gmail.com> wrote:
> 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?
>

One solution would be to compile all of your code that uses
define-syntax into a loadable module, then you can load that into the
interpreter.

But I suspect that you will not be satisfied with that, so run "gsi
-:s" to run the interpreter with syntax-case support.  Just be aware
of the limitations -- as it says on page 51 of the 4.6.0 manual:

"Note that this implementation of syntax-case does not support special
forms that are specific to Gambit."

See Marc (if you're listening/reading) some people actually *do* read
the documentation :-D


> 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.
>

Standards often don't line up with the way some folks want to do
development.  Just because something is a standard doesn't mean it is
the best way to do things (in fact, the opposite can be true --
design-by-committee can lead to bloated, unmanageable code).

I for one am glad that Gambit leans toward non-hygenic macros.  I was
trying to decide whether to get comfortable using Common Lisp or
Scheme first.  I liked Common Lisp's non-hygenic macros, but I also
really liked the consistency and simplicity of Scheme.  Gambit allows
me to have both.  Also, the ability to compile to C is a big plus also
IMHO.

REPLeffect

[snip]



More information about the Gambit-list mailing list