Is it possible to set an id from a symbol, call it set-symbol? For example, I
might type
(define life -12)
(set-symbol 'life 42)
life ; => 42
The reason I want to do this is so that I can store a cache of variables to
disk.
The cache will contain a list of variables to be stored. So I might ultimately
want something like
(define-cache a-cache "mycachefile")
(encache a-cache foo)
(encache a-cache bar baz)
(set! foo 42)
foo ; => 42
(save-cache a-cache)
which attempts to define the variables foo, bar and baz if they have been
serialized to mycachefile, and leave them as (void) otherwise.
_________________________________________________
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users