gensym not creating unique symbols

From: Brian Denheyer <briand_at_deldotd.com>
Date: Wed, 23 Jun 1999 13:37:01 -0700 (PDT)

Observe the following :

Welcome to the STk interpreter version 3.99.4 [Linux-2.X-ix86]
Copyright (C) 1993-1999 Erick Gallesio - I3S - CNRS / ESSI <eg_at_unice.fr>
STk> (define x (gensym))
x
STk> x
|G1|
STk> (define x (gensym "s"))
x
STk> x
s2
STk> (define y 's4)
y
STk> x
s2
STk> y
s4
STk> (gensym "s")
s3
STk> (gensym "s")
s4

!!??

's4 already exists but gensym returned s4. Yowzer ! I thought symbols
returned by gensym were guaranteed to be unique ??? Or am I thinking
too lispish ?

I need someway to restore tags and then begin creating unique tags.
Can anyone suggest a good strategy to do this. The obvious idea is to
make a "id" hash table which would simply store all of the id's used
so that it would know if a newly generated id was unique or not.

Brian
Received on Wed Jun 23 1999 - 22:37:54 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST