[alexandria-devel] symbolicate

Stelian Ionescu sionescu at common-lisp.net
Thu Jun 5 11:25:22 UTC 2008


On Thu, Jun 05, 2008 at 12:55:30PM +0300, Nikodemus Siivola wrote:
>On Thu, Jun 5, 2008 at 12:29 PM, Attila Lendvai
><attila.lendvai at gmail.com> wrote:
>
>>> FWIW, I think FORMAT-SYMBOL is almost always preferable, but I admit
>
>> (symbolicate '#:foo- name '#:-bar)
>>
>> which looks like this using format-symbol:
>>
>> (format-symbol t "~A-~A-~A" '#:foo name '#:bar)
>
>...I did say "almost' :)
>
>But what's wrong with
>
> (format-symbol t "FOO-~A-BAR" name)

that it does the wrong thing on "modern" lisps, in that 
(format-symbol t "FOO-~A-BAR" 'baz) yields something that prints
|FOO-baz-BAR| , while (symbolicate '#:foo 'baz '#:bar) works fine

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/alexandria-devel/attachments/20080605/6fb33b71/attachment.sig>


More information about the alexandria-devel mailing list