kp gores wrote:
> problem: hash-tables want sysmbols as keys.
> Q: is there a way to make (setf (gethash "bla" dict) attribute-list )
> work?
> (i tried
> (setf (gethash 'bla dict) attribute-list )
> (gethash (read-from-string word) dict)
> with no success)
>
Paul Graham's _ANSI_Common_Lisp_ makes an interesting observation
(pg.138):
If you're going to write programs that operation on words,
it's often a good idea to use symbols instead of strings,
because symbols are conceptually atomic. Symbols can be
compared in one step with eql, while strings have to be compared
character-by-character with string-equal or string=.
He goes on to present an example which uses #'intern to convert each
string into a symbol for use as keys in a hash table which counts
word frequencies in a text.
Greetings from San Diego,
Eric Scott
Cognitive Ergonomics Research Facility
San Diego State University