From: David Kastrup <dak@gnu.org>
To: guile-devel@gnu.org
Subject: Re: Unsafe psyntax label generation
Date: Wed, 25 Jan 2012 14:46:07 +0100 [thread overview]
Message-ID: <87sjj36gkg.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87mx9cr21z.fsf@netris.org
Mark H Weaver <mhw@netris.org> writes:
> Andy Wingo <wingo@pobox.com> writes:
>
>> On Tue 24 Jan 2012 15:01, Mark H Weaver <mhw@netris.org> writes:
>>
>>> `local-eval' combines syntax objects from two different sessions into a
>>> single syntax object (in the wrapper procedure), and thus there may be
>>> label name collisions. Now, if this combined syntax object is
>>> serialized as a compiled procedure, these labels with the same name will
>>> be optimized together into the same string object!
>>
>> A very good point!
>>
>> Cf. Aziz's psyntax/expander.ss from r6rs-libraries.dev:
>>
>> ;;; (two marks must be eq?-comparable, so we use a string
>> ;;; of one char (this assumes that strings are mutable)).
>>
>> ;;; gen-mark generates a new unique mark
>> (define (gen-mark) ;;; faster
>> (string #\m))
Dingdingding. That sounds to me like I am not the only person of the
opinion that (eq? (string) (string)) is a standard-compliant
implementation choice. I know this was a different discussion
altogether but thought it might be worth pointing out.
--
David Kastrup
next prev parent reply other threads:[~2012-01-25 13:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 14:01 Unsafe psyntax label generation Mark H Weaver
2012-01-24 21:27 ` Andy Wingo
2012-01-25 1:41 ` Mark H Weaver
2012-01-25 13:21 ` Ludovic Courtès
2012-01-25 14:27 ` Andy Wingo
2012-01-25 13:46 ` David Kastrup [this message]
2012-01-26 11:26 ` Andy Wingo
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=87sjj36gkg.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=guile-devel@gnu.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).