[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: for-each et al

From: Andy Wingo
Subject: Re: for-each et al
Date: Wed, 05 Mar 2014 20:59:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

On Tue 04 Mar 2014 23:35, address@hidden (Ludovic Courtès) writes:

> I think the for-each change would be for 2.2, right?

Sure.  I'm really just on 2.2 these days...

>>   * Deprecate set-car!/set-cdr! (replacement would be mutable cells in
>>     the car/cdr; currently called variables, but could be called boxes)
> SRFI-111 boxes.

Sure.  I guess we should rename our variables to boxes.

> 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.

> 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.

>>   * 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]