<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; CHARSET=UTF-8">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=055280716-17022006>hello;</SPAN></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
elephant-devel-bounces@common-lisp.net
[mailto:elephant-devel-bounces@common-lisp.net]<B>On Behalf Of </B>Robert L.
Read<BR><B>Sent:</B> Friday, February 17, 2006 16.17<BR><B>To:</B>
Elephant-devel mailing list<BR><B>Subject:</B> [elephant-devel] A thorny
problem....<BR><BR></FONT></DIV>
<DIV>I think I've a identified a serious problem relating to the<BR>the
dependencies on various modules that I offer up<BR>for you comment.<BR><SPAN
class=055280716-17022006><FONT face=Arial color=#0000ff
size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=055280716-17022006></SPAN> </DIV>
<DIV><SPAN class=055280716-17022006>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>i
have a naive know<SPAN class=055280716-17022006> ledge </SPAN> of
elephant, but would be surprised that this is a problem.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>one
writes a macro which targets a generic function.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>a
macro does several useful things.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>1.
it preforms syntactic rewriting</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>2.
it delays evaluation.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>3.
if it is to be useful, this king of macro provides a standard interface to
varying implementations.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>when
i skim over the definitions which i find in utils.lisp and berkeley.lisp, i
observe that thay do lots of 1, none of 2 and half of three, and that it
appears that their siginficance to a bit of application code depends on the
active package.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>in
order to avoid what you describe as a thorny problem, you would need
to</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>-
have one macro only. not different ones with analogous names in different
packages.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>-
have that macro always take the same syntax (which those seem, mostly, to
do)</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>-
prepare all arguments to pass to an implementation-specific
function</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>-
capture the body in a closure</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>-
invoke the implementation-specific function with a specializing argument, the
closure, and the keyword arguments.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>the
implementation-specific function is generic, with a method defined by each
backend.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff size=2>the
approach is good parcive in general for macros - means you don't need to
recompile code if the implementation changes, but is essential to implement
and use modular back.ends.</FONT></SPAN></DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=164505515-17022006><FONT face=Arial color=#0000ff
size=2>...</FONT></SPAN></DIV> </SPAN><BR></DIV></BLOCKQUOTE></BODY></HTML>