[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Any way I can I export a macro that expands to "private" symbols?
From: |
Michael Livshin |
Subject: |
Re: Any way I can I export a macro that expands to "private" symbols? |
Date: |
29 Apr 2001 11:04:59 +0300 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Copyleft) |
Rob Browning <address@hidden> writes:
> Is there any way I can export a macro that expands to reference
> non-exported symbols? I've had a few cases lately where this would
> have been very useful. One example is where you'd like to make
> handling optional arguments more efficient for the 0 and 1 arg
> cases.
the Wadell/Dybvig module system includes functionality that lets you
do just that (export some names, but only if used by a particular
macro expansion).
I wonder how easy it would be to implement the current Guile module
system in terms of the Wadell/Dybvig system. doesn't seem exactly
trivial to me, but would probably make everyone happy.
[ oh, and to (try to) answer your question from one day ago: yes, you
have to perform ugly magic to make `syntax-rules' do any nontrivial
stuff.
`syntax-case' is much more powerful. it also seems to be the
emerging de-facto standard (used by Chez, the upcoming MzScheme, and
a couple of other implementations).
the downside (at least for me) is that I found the "advanced"
functionality of `syntax-case' absolutely unpenetrable. like, I had
a couple of "hey, I finally get it!" moments, but everything was
gone the following morning... ]
--
Computer Science is embarrassed by the computer.
-- Alan Perlis