hi,
fyi, i've pushed symbolicate.
irc rumour has it, that Nikodemus was pretty favorable to adding it... so, i hope it won't initiate a veto fury... :)
it seemed to be the most forward looking way to fix cffi-grovel.
On Thu, Jun 5, 2008 at 12:22 AM, Attila Lendvai attila.lendvai@gmail.com wrote:
fyi, i've pushed symbolicate.
irc rumour has it, that Nikodemus was pretty favorable to adding it... so, i hope it won't initiate a veto fury... :)
it seemed to be the most forward looking way to fix cffi-grovel.
FWIW, I think FORMAT-SYMBOL is almost always preferable, but I admit SYMBOLICATE is a classic of sorts.
Cheers,
-- Nikodemus
FWIW, I think FORMAT-SYMBOL is almost always preferable, but I admit SYMBOLICATE is a classic of sorts.
for the record, cffi is full of these:
(symbolicate '#:foo- name '#:-bar)
which looks like this using format-symbol:
(format-symbol t "~A-~A-~A" '#:foo name '#:bar)
which is much more verbose for this kind of task. so, i think they both have their own places where they are are useful.
On Thu, Jun 5, 2008 at 12:29 PM, Attila Lendvai attila.lendvai@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)
? If you use symbolicate you still the the case in effect at the time CFFI was compiled, so "case concerns" are not convincing.
which is much more verbose for this kind of task. so, i think they both have their own places where they are are useful.
...I do agree, SYMBOLICATE does have it's place.
Cheers,
-- Nikodemus
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@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
2008/6/5 Stelian Ionescu sionescu@common-lisp.net:
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
I'm not sure I care if something works in a non-standard system -- for something as non-standard as Allegro "modern" mode. ...but granted, there are people who may have to care, and they will want to avoid hardcoding strings in FORMAT-SYMBOL if the resulting symbol is a user-visible one.
SYMBOLICATE is good.
Cheers,
-- Nikodemus
alexandria-devel@common-lisp.net