Subject: Re: Loops in macro definition
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 15 May 2001 09:48:26 GMT
Newsgroups: comp.lang.scheme
Message-ID: <9dqu1a$8ds36$1@fido.engr.sgi.com>
<stephan@pcrm.win.tue.nl> wrote:
+---------------
| On the other hand, it is wise to put in an "escape hatch" into
| your HDL, i.e. a construct like (scheme ...) and then ...
| is a pure Scheme program which is called with eval.
| 
| If you still don't like this approach, I would recommend
| implementing this kind of thing not on top of hygienic macro's,
| but on top of a CL defmacro-like system. defmacro-style macro's
| are more difficult to get right, but also more powerful.
+---------------

And for the ultimate in convenience, you can do something like
what "scsh" does with its process macros, and make the HDL be
implicitly quasiquoted. That is, the "escape hatch" becomes simply
"unquote" or "unquote-splicing", e.g.,

    (net sig-name
	 pin1
	 pin2
	 ,@(map translate-daughter-pins d-pin-list-73)
	 pin3)


-Rob

-----
Rob Warnock, 31-2-510		rpw3@sgi.com
SGI Network Engineering		<URL:http://reality.sgi.com/rpw3/>
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA