Is there a command to convert a string to a symbol in CL?
Thanks!
Fred Gibson, Architect
·········@gibson-design.com Architecture designed Objectively
==================================-----------||||||||||||||||||||||
(c)1998 http://www.gibson-design.com
Marc Mertens wrote:
>
> "Frederick C. Gibson, Architect" wrote:
>
> > Is there a command to convert a string to a symbol in CL
> Try 'read-from-string'.
An inferior solution, since it doesn't work on general
strings, and is very slow.
Paul
Marc Mertens <········@akam.be> writes:
> UGF1bCBEaWV0eiB3cm90ZToNCg0KPiBNYXJjIE1lcnRlbnMgd3JvdGU6DQo+ID4NCj4gPiAi
> RnJlZGVyaWNrIEMuIEdpYnNvbiwgQXJjaGl0ZWN0IiB3cm90ZToNCj4gPg0KPiA+ID4gSXMg
As a sidenote, why do you encode your postings in base64?
--
``Round about the terminal go; / In the poisoned upgrade throw.
Code, which by a student done / In minutes numbering sixty-one.
Run-time error, protection fault / Crash ye first, crash ye shalt.''
(The Oracle, MacBeth95)
In article <··········@sjx-ixn8.ix.netcom.com> , "Frederick C. Gibson,
Architect" <·········@gibson-design.com> wrote:
>Is there a command to convert a string to a symbol in CL?
INTERN if you want an interned symbol, otherwise MAKE-SYMBOL. See chapters
10 and 11 of the CLHS at <http://www.harlequin.com/books/HyperSpec/>.
--
David B. Lamkins <http://www.teleport.com/~dlamkins/>
Recently undead Isabelle to the archangel Gabriel in "The Prophecy II":
"So, you're keeping me alive because you don't know DOS?"
"David B. Lamkins" <········@teleport.com> writes:
> In article <··········@sjx-ixn8.ix.netcom.com> , "Frederick C. Gibson,
> Architect" <·········@gibson-design.com> wrote:
>
> >Is there a command to convert a string to a symbol in CL?
>
> INTERN if you want an interned symbol, otherwise MAKE-SYMBOL. See chapters
> 10 and 11 of the CLHS at <http://www.harlequin.com/books/HyperSpec/>.
Right, although I have to say I'm a little uncomfortable philosophically
with the verb "convert" in this context. It's a little like saying,
"how do i convert a ten-dollar bill into a pizza?" In some sense, one
can do that, but the two are not equivalent items, and the process is not
mere translation in the same sense as turning a simple list into a
simple vector might be (analogy: turning two fives into a ten, or turning
a buffalo nickel into a jefferson nickel, where you have mere alternate
representations that you're shifting between with no essential loss of
information or lack of invertibility).
INTERN computes a functional relationship between a key and a
constructed value; that's not the same as transforming the object's
representation directly. Even MAKE-SYMBOL is more akin to cons than
to COERCE in that it creates an object with new slots like property
list, function cell, etc.
It's a small point, I guess. But somehow it seemed worth saying
anyway...