Subject: Strings and symbols (Was: Case sensitive maxima)
From: Steve Haflich
Date: Wed, 27 Oct 2004 16:24:02 -0700
From: Richard Fateman <fateman at cs>
It seems to me that the disadvantage of true strings is
that they look like atoms... e.g. (atom "abc") is t.
but they can't have property lists and can't be assigned
values. They could always be made into symbols and then
the string would be the symbol's print name.
Symbols cannot be assigned values. A variable named by a symbol can
be assigned a value, but it is a source of great confusion to skip
this nuance.
The advantage of strings has to do with memory savings
in not producing symbol structure. Anything else?
A string is a particular kind of 1-dimension array and as such is
mutable and manipulable in all the ways that 1-dimensions arrays are
manipulable (if the string was not a literal object in code and
therefore immutable). It is not legal to modify a string that is the
name of a symbol.