Re: gensym not creating unique symbols

From: Lars Thomas Hansen <lth_at_ccs.neu.edu>
Date: Thu, 24 Jun 1999 09:26:55 -0400

Well, not all implementations allow the symbols created by GENSYM to be
printed and read back in, but GENSYM still behaves correctly:

        Larceny v1.0a1 (precise:SunOS5:split) (lth 21-Dec-98 16:23:57)

> (define x (gensym "s"))
        x
> x
        s1001
> (eq? x 's1001)
        #f
>

This demonstrates the fact that in many implementations, GENSYM returns
symbols that are unique but do not have unique print names!

So you really need to compare the _symbol_ returned from GENSYM with a
standard symbol with the same print name. (If they compare eq?, I'd say
you have cause for complaint :-)

--lars
Received on Thu Jun 24 1999 - 15:27:58 CEST

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