[plt-scheme] string properties
I'd like to secretly associate data with normal string values.
The interface could be like this:
(set-string-property! STR VALUE) --> #<void>
(string-property STR) --> VALUE
Or like this:
(make-string-property NAME) --> STR-PROP
(set-string-property! STR STR-PROP VALUE) --> #<void>
(string-property STR STR-PROP) --> VALUE
For my current application, it would be OK if the property value applied
to all strings "equal?" rather than "eq?".
I'm thinking a PLT hash table with weakly-held keys, mapping strings to
values, would work for this purpose.
Is there a better way?