[Ecls-list] remarks on git HEAD, 1b808f229076..
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Fri May 7 21:30:11 UTC 2010
On Fri, May 7, 2010 at 11:17 PM, Tobias C. Rittweiler <tcr at freebits.de>wrote:
> Sure but why not just use with-unique-names?
>
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.
I simply find this
(with-clean-symbols (array-index)
`(let ((array-index ,index))
(declare (:read-only array-index))
,(expansion a 'array-index))))
more aesthetically pleasant and less error prone than this
(with-unique-names (array-index)
`(let ((,array-index ,index))
(declare (:read-only ,array-index))
,(expansion a ',array-index))))
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.
In fact, Alexandria contains a bunch of useful stuff. Actually I wanted
> to help polishing it up, so implementators can take and include it like
> they include ASDF.
>
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.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100507/a2799d66/attachment.html>
More information about the ecl-devel
mailing list