GNU bug report logs - #20087
'gensym' is not guaranteed to return a fresh symbol

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Wed, 11 Mar 2015 17:16:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andy Wingo <wingo <at> pobox.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Mark H Weaver <mhw <at> netris.org>, 20087 <at> debbugs.gnu.org, rain1 <at> openmailbox.org
Subject: bug#20087: gensym
Date: Thu, 23 Jun 2016 15:48:49 +0200
On Thu 24 Mar 2016 09:45, ludo <at> gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> It turns out the manual already has the following text in the ‘gensym’
>> entry, which I think is sufficient.
>>
>>      The symbols generated by ‘gensym’ are _likely_ to be unique, since
>>   their names begin with a space and it is only otherwise possible to
>>   generate such symbols if a programmer goes out of their way to do so.
>>   Uniqueness can be guaranteed by instead using uninterned symbols
>>   (*noteSymbol Uninterned::), though they can’t be usefully written out
>>   and read back in.
>>
>> What do you think?
>
> Oh indeed, I guess I had overlooked that.

I just pushed something to master to error when serializing an
uninterned symbol.  Otherwise compiling an uninterned symbol effectively
interns it!  I am not sure that we can apply such a fix in 2.0 though as
who knows, maybe someone is compiling something with symbols made with
make-symbol.  WDYT?  If you agree we can close this bug.

Andy




This bug report was last modified 9 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.