[comp.lang.lisp] saving hash table

alanr@haydn.media-lab.media.mit.edu (Alan Ruttenberg) (05/05/91)

In article <1991May3.134834.26515@hellgate.utah.edu> moore%defmacro.utah.edu@cs.utah.edu (Tim Moore) writes:


   In article <PAB.91May3123317@challenger.lucid.com> pab@lucid.com (Peter Benson) writes:
   >There is a hack that works (I think) in lucid common lisp. 
   >That is make a file with just
   >
   >(in-package :whatever)
   >(setq *hash-table* '#.*hash-table*)
   >
   >and then compile that file.  
   >I don't know if this is required to work by CLtL.  Any x3j13 people know if
   >this is clarified.

   One problem is that compiled constants are immutable, which means you
   couldn't (portably) add or delete any entries in the hash table when
   you loaded the file back in.

   -- 
   Tim Moore                    moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
   "Ah, youth. Ah, statute of limitations."
		   -John Waters

Though immutable, at least it is there. You could then maphash over
the entries and hash into a new table.

-alan