From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: for-each et al
Date: Wed, 05 Mar 2014 23:32:16 +0100 [thread overview]
Message-ID: <874n3cwa33.fsf@gnu.org> (raw)
In-Reply-To: <87r46g4dtn.fsf@pobox.com> (Andy Wingo's message of "Wed, 05 Mar 2014 20:59:00 +0100")
Andy Wingo <wingo@pobox.com> skribis:
> On Tue 04 Mar 2014 23:35, ludo@gnu.org (Ludovic Courtès) writes:
[...]
>> I suspect SCM_SETCAR/SCM_SETCDR are actually more widespread than
>> their Scheme counterparts, and probably much harder to avoid. What
>> can we do with them?
>
> Depends. If they are used to build up a data structure, I wouldn't
> worry -- it's not detectable by Scheme except via continuation hacks.
> There are only about 70 places in libguile itself that we use SETCDR,
> and 30 or so for SETCAR. Not that bad. About 40 callers of
> scm_reverse_x though.
Right, maybe that’s not too scary.
>> Another issue: what about elisp? It needs mutable pairs, but we don’t
>> want to have it use a disjoint type.
>
> A very good question, and I don't know. Would a tc7 mutable-pair type
> be that bad? Could we do it with a tc3 instead? Dunno. This could
> make it impossible.
The question IMO is not about tagging, but about having a disjoint type.
I think the whole idea behind elisp support was that it could use the
very same data types as Scheme code, which would no longer be the case
if mutable pairs and immutable pairs were disjoint.
>>> * Introducing a #!lang facility, and having programs with #!lang make
>>> immutable pairs
>>
>> Not really fan of the idea. :-)
>
> Why not? It makes it clear what's in scope at the beginning of a file,
> which is a nice advantage.
I have mixed feelings: as a way to save a few use-modules, it’s looks
both convenient and hackish (you can’t #!lang several languages
typically, right?).
Thanks,
Ludo’.
prev parent reply other threads:[~2014-03-05 22:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-02 15:55 for-each et al Andy Wingo
2014-03-02 21:27 ` Ludovic Courtès
2014-03-04 20:30 ` Andy Wingo
2014-03-04 22:35 ` Ludovic Courtès
2014-03-05 19:59 ` Andy Wingo
2014-03-05 22:32 ` Ludovic Courtès [this message]
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=874n3cwa33.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/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).