[plt-scheme] gensym & comparison

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Fri Jun 20 18:58:14 EDT 2008

The idea of gensym is to generate symbol that is not eq? to any other 
symbol. So I don't know what you are asking here. You can always convert 
symbol->string, and then compare string, but that's something against 
the reason to have gensym.


YC wrote:
> Hi -
> Is there a way to compare gensym symbols with a manually created 
> symbol, short of converting them to strings?  It's okay if not - just 
> want to know the reason that they cannot be compared?
> > (define sym (gensym))
> > sym
> g30043
> > (equal? sym 'g30043)
> #f
> > (equal? 'g30043 'g30043)
> #t
> Thanks,
> yc

Posted on the users mailing list.