Subject: Re: C++ templates vs. syntax-rules: a median challenge
From: rpw3@rpw3.org (Rob Warnock)
Date: Mon, 03 Feb 2003 22:38:50 -0600
Newsgroups: comp.lang.scheme,comp.lang.functional
Message-ID: <co-dndHhGt1H3qKjXTWc-g@speakeasy.net>
oleg@pobox.com <oleg@pobox.com> wrote:
+---------------
| It is true that all Scheme systems I encountered support some
| low-level macro facility. However, there is no single universally
| supported eval-based macro facility. For example, Bigloo provides
| 'define-macro'. SCM has defmacro, which can be used to implement
| define-macro. MIT Scheme offers something different and more powerful
| (which fortunately, is enough to implement define-macro). Scheme48 has
| renaming-based macros that are a different beast entirely. If we want
| to write a macro that can be expanded on SCM, Bigloo, Gambit,
| Scheme48, MIT Scheme, Chicken, PLT Scheme and Chez Scheme, we have
| only one choice: R5RS syntax-rules.
+---------------

I disagree [except perhaps for Scheme48, with which I'm unfamiliar]. I
have yet to find one of those low-level facilities in which it is other
than trivial to write a Common Lisp-compatible "defmacro". What I used
to do when I was playing with a *lot* of different Schemes was simply
define "defmacro" (if it didn't exist already) in whatever low-level
macro *was* available, then use "defmacro" for everything.

[That has the added advantage (to me) that when programming in Common
Lisp one doesn't need to learn yet another macro system. But YMMV. ;-} ]


-Rob

-----
Rob Warnock, PP-ASEL-IA		<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607