<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Pascal Costanza wrote:
<blockquote cite="mid:F9FF5CD3-5285-435A-B581-C4DCDDE088BB@p-cos.net"
type="cite">
<pre wrap="">On 7 Sep 2010, at 23:41, Daniel Weinreb wrote:
</pre>
<blockquote type="cite">
<pre wrap="">It's very, very hard to know what "best macro" means. It's
like asking for the "best function". Perhaps what people
mean is the "cutest" or "most remarkable" macro.
</pre>
</blockquote>
<pre wrap=""><!---->
I was rather amazed when discovering a technique for integrating hygiene-compatible macros into Common Lisp. How to do this is described here: <a class="moz-txt-link-freetext" href="http://www.jucs.org/jucs_16_2/embedding_hygiene_compatible_macros">http://www.jucs.org/jucs_16_2/embedding_hygiene_compatible_macros</a> (In the paper, it's described in terms of Scheme, because that's easier to explain, but the 'actual' implementation is in Common Lisp, as also described more superficially in that paper, and also available for download).
I'm not sure that this is actually a practically useful approach, but it surely shows how powerful Common Lisp macros are. (Definitely more powerful than many people think.) </pre>
</blockquote>
It would be wonderful if, in your copious free time, you could write<br>
a paper that expressed this: how powerful Lisp macros are. It<br>
would not need to be at a "peer-reviewed" sort of level; in fact,<br>
it would ideally be written so that a Python programmer could<br>
understand it.<br>
<br>
I tried to write a Python vs. Common Lisp comparison once,<br>
but it was too hard and I didn't have enough time. The<br>
big question is, should we look at the existing languages<br>
like Python and Ruby that have co-opted so many of<br>
the good features of Lisp, and declare victory and go home.<br>
Well, Python isn't so good at using functions as objects<br>
(I read somewhere that Guido actually wanted to<br>
remove "map" and "reduce" and such from the language,<br>
but got too much pushback). Ruby, I gather, does that a<br>
lot more.<br>
<br>
But the real point is that you can do so much more with<br>
macros, in all Lisps (including Clojure). I often get told,<br>
oh, you don't need Lisp macros; facilities in other<br>
languages can do all the things Lisp macros can do.<br>
<br>
Although this is wrong, there isn't any quick way to<br>
answer the objection. So it would be nice if there<br>
were an easy-to-deploy explanation of why this is not<br>
true and Lisp macros really are a unique abstraction<br>
mechanism that's very valuable.<br>
<br>
Unfortunately, writing this isn't easy, and all the<br>
people who know how to do it as very busy...<br>
<br>
-- Dan<br>
<br>
<br>
<br>
<blockquote cite="mid:F9FF5CD3-5285-435A-B581-C4DCDDE088BB@p-cos.net"
type="cite">
<pre wrap="">The technique in that paper could maybe become more practically useful if it gets integrated directly in a Common Lisp implementation itself. Not that I think that macro hygiene is actually a real problem... ;)
Pascal
</pre>
</blockquote>
</body>
</html>