Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Bruno Haible <bruno@cl...> - 2004-04-27 14:43:52
|
Sam wrote: > Some smart-ass will use it in his HT and will be stunned with > > (setf (gethash 'foo ht) 'bar) > (gc) > (gethash 'foo ht) ==> NIL > > are we willing to live with this? No, we can give an error during (setf gethash). > if not, we can add a setfable SYS::HT-GC-INVARIANT-P. We can verify for the simple cases (EQ, EQL and CLASS-HASHCODE) that all keys in the hash table are GC-invariant. > E.g., (case x (1 'one) (2 'two) (t 'many)) will create an HT which will > not need to be rehashed. Cool! I hadn't thought of this. Bruno |