Christopher Allan Webber <cweb...@dustycloud.org> writes: > I thought they weren't but now I'm not really sure where I got that > idea from. Does anyone know for sure?
They are garbage-collected. This is not overly relevant outside of C/C++ code since as long as any code references a symbol, it will stay around. It's only when you look at things like its address independent of the symbol that you'd notice. scheme@(guile-user)> (object-address 'blablaaaaaa) $4 = 94515697299616 scheme@(guile-user)> (gc) scheme@(guile-user)> (object-address 'blablaaaaaa) $5 = 94515696660320 scheme@(guile-user)> Similar for hashq: without the symbol being stored somewhere, it will likely deliver different values each time round. If you put this into code rather than retyping it on the command line, the address will be the same each time. You'd need to use something like (string->symbol "blablaaaaaa") in order to get different addresses: a literal symbol in the code would be protected. -- David Kastrup