<div dir="ltr"><div>define-macro is supported only within begin-foreign (or begin-ffi) blocks, where you drop to pure gambit.</div><div><br></div><div>-- vyzo<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 15, 2020 at 11:52 AM Lassi Kortela <<a href="mailto:lassi@lassi.io">lassi@lassi.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks for sticking around, Iain. It's not a dumb question. Scheme <br>
macros are unusually difficult to understand especially since the macro <br>
systems are many and varied. Even experts have trouble with the finer <br>
points now and then.<br>
<br>
Re: Gambit and Gerbil, Gambit follows Scheme standards (R5RS and R7RS) <br>
faithfully and adds only a minimal number of its own concepts to the <br>
language, focusing more on efficiency. The main ones are:<br>
<br>
- threads<br>
- versatile ports (not just byte and character ports)<br>
- weak references<br>
- keyword arguments and keyword objects<br>
- various introspection facilities<br>
<br>
These are useful augmentations but do not change the essential <br>
programming style or "flair" of classic Scheme.<br>
<br>
By contrast, Gerbil is much more adventurous with the core language, <br>
notably adding actors and methods which are a big conceptual leap. (As <br>
an amusing coincidence, Wikipedia tells us that Scheme was originally <br>
invented as a tool to study the Actor model way back in the 1970s, so I <br>
guess Gerbil brings it full circle :)<br>
<br>
As for define-macro, it seems to exist in Gerbil but doesn't work the <br>
same way it does in pure Gambit:<br>
<br>
Gerbil v0.15.1 on Gambit v4.9.3<br>
 > (define-macro (foo x y) `(+ ,x ,y))<br>
 > (foo 2 3)<br>
*** ERROR IN (console)@2.1 -- Ill-formed expression<br>
<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list</a><br>
<br>
</blockquote></div>