From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: rain1@openmailbox.org, 20087@debbugs.gnu.org
Subject: bug#20087: gensym
Date: Tue, 22 Mar 2016 08:58:27 +0100 [thread overview]
Message-ID: <87wpovueos.fsf@gnu.org> (raw)
In-Reply-To: <87twjzytit.fsf@netris.org> (Mark H. Weaver's message of "Tue, 22 Mar 2016 01:24:26 -0400")
Mark H Weaver <mhw@netris.org> skribis:
> I've considered this idea in the past, but it only avoids collisions
> with symbols that have been interned before the gensym. It does not
> avoid collisions with symbols interned *after* the gensym. Obviously,
> there's no way to avoid such collisions.
Yeah, good point.
> If we cannot eliminate the possibility of collisions, and we cannot
> avoid intentional collisions, what can we do? I think the best we can
> hope for is to significantly reduce the probability of _unintentional_
> collisions, perhaps by starting the gensym counter at a large number.
I’m not sure if that would help.
One thing that could help avoid unintentional collisions is to
automatically add whitespace before the number, such that:
(gensym "x") => #{x 123}#
(This is already the case when called with no arguments.)
> The other thing we can do is to clearly document these inherent problems
> with gensym, so that they will not be misused for jobs for which they
> are not appropriate.
I think we should add a sentence to that effect in the manual.
Thanks,
Ludo’.
next prev parent reply other threads:[~2016-03-22 7:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 17:15 bug#20087: 'gensym' is not guaranteed to return a fresh symbol Ludovic Courtès
2016-03-18 17:03 ` bug#20087: gensym rain1
2016-03-22 5:24 ` Mark H Weaver
2016-03-22 7:58 ` Ludovic Courtès [this message]
2016-03-23 17:55 ` Mark H Weaver
2016-03-24 8:45 ` Ludovic Courtès
2016-06-23 13:48 ` Andy Wingo
2016-06-23 14:13 ` Ludovic Courtès
2016-06-23 16:05 ` Andy Wingo
2016-03-22 11:21 ` rain1
2016-03-22 18:06 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpovueos.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=20087@debbugs.gnu.org \
--cc=mhw@netris.org \
--cc=rain1@openmailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).