I create a plist with keys that I turn into a symbol from some data with make-symbol
:
(defparameter *plist* (list (make-symbol "key") "val"))
It creates the symbol #:|key|
: it starts with a sharp sign.
(#:|key| "val")
Using getf
mysteriously returns nil:
(getf *plist* :|key|)
NIL
and it is not possible to use #:|key|
. This denotes, AFAIK, a variable, which is undefined. I tried a combination of (intern (string (make-symbol…
with no success.
Note that the access
library works on that structure:
(access:access *plist* :|key|)
"val"
T
What is going on? Is make-symbol
appropriate? How can I make getf
work?
Thanks
What I am doing is populating an existing plist with user data. New keys can be created on the fly. A plist has been convenient so far. Maybe is there a better suited data structure for this, like a hash-table.