On Fri, May 7, 2010 at 11:17 PM, Tobias C. Rittweiler <span dir="ltr"><<a href="mailto:tcr@freebits.de">tcr@freebits.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div>Sure but why not just use with-unique-names?</div></blockquote><div><br>Simple: 1) I do not want to cons a new symbol every time the macro is expanded, 2) I know that the current macro expansion is safe if those symbols are just unique, 3) backquoted expression is plain *ugly* when using those macros (I simply do not like the abuse of "," in the expression making them more complicated than needed) and 4) the use of new symbols in every expansion makes the backquoted expression less efficient and prone to reuse, typically doubling the size of the generated code.<br>
<br>I simply find this<br><br> (with-clean-symbols (array-index)<br>
`(let ((array-index ,index))<br>
(declare (:read-only array-index))<br>
,(expansion a 'array-index))))<br><br>more aesthetically pleasant and less error prone than this<br><br>
(with-unique-names (array-index)<br>
`(let ((,array-index ,index))<br>
(declare (:read-only ,array-index))<br>
,(expansion a ',array-index))))<br><br>The fact that some people may know with-unique-names does not seem such a plus for using it in a bunch of code, the ECL compiler, where already 99% is original and forces you to learn the conventions and macros used.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
In fact, Alexandria contains a bunch of useful stuff. Actually I wanted<br>
to help polishing it up, so implementators can take and include it like<br>
they include ASDF.<br></blockquote></div><br>I prefer to minimize the set of dependencies in my code and do not mind duplicating existing macros that much, but I do not mind distributing that library with ECL if requested.<br>
<br>Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>