[pro] Is gensym used for anything except alpha-conversion in macros?

Steve Haflich shaflich at gmail.com
Sun Jul 10 18:29:23 UTC 2011


On Jul 10, 2011 2:09 AM, "David McClain" <dbm at refined-audiometrics.com>
wrote:
>
> Gensym can also be used to produce globally (session wide) unique objects.

But this is no different from other objects, such as a cons or array.

The primary difference between an uninterned symbol and any other object
that has settable "slots" is its behavior as a form under evaluation.
Arrays and most other objects self evaluate; a cons has complex
interpretation as a form; but a symbol evaluates to its its current special
or lexical value binding. That's why gensyms are mostly use as hygienic
names in macro expansions.

There are other ways of doing whar a ge.sym does. Maybe later when I'm not
typing on a tiny phone keyboad i'll show one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20110710/4b93cada/attachment.html>


More information about the pro mailing list