From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32
Date: Tue, 27 Sep 2011 22:37:31 +0200 [thread overview]
Message-ID: <874nzxpvqs.fsf@gnu.org> (raw)
In-Reply-To: <8762kfy2h1.fsf@pobox.com> (Andy Wingo's message of "Mon, 26 Sep 2011 13:20:26 +0200")
Hi,
Andy Wingo <wingo@pobox.com> skribis:
> Regarding identity, `cons' needs to return objects with identity. These
> expressions expressions are not the same:
>
> (define f
> (let ((pair (cons 1 2)))
> (lambda ()
> pair)))
>
> (define f
> (lambda ()
> (cons 1 2)))
>
> Here we cannot propagate `pair' because then we would break (eq? (f)
> (f)). It's a question of identity.
Right, good point.
[...]
> `car' is pure -- if its argument is
> indeed a pair, then it has no side effects -- but it is not constant.
OK, got it!
(Though I think that the term ‘constant’, as used by GCC, is confusing.
I don’t have a better name to propose, though.)
[...]
>>> Also, if I'm correct in guessing the reason for this change (accessing
>>> mutable memory), shouldn't the bytevector-*-ref operations go as well?
>>
>> No because they return an immutable object.
>
> I think we got this wrong, Ludo, and we should probably create some list
> of pure accessors for mutable data and put bytevector-*-ref in it, for
> the same reason given above for `h'.
Yes, agreed.
Thanks!
Ludo’.
PS: In that context, it must be quite a relief to work on a purely
functional language... :-)
next prev parent reply other threads:[~2011-09-27 20:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1R78DA-0005aI-MY@vcs.savannah.gnu.org>
2011-09-24 18:37 ` GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32 Mark H Weaver
2011-09-25 20:34 ` Ludovic Courtès
2011-09-26 11:20 ` Andy Wingo
2011-09-27 20:37 ` Ludovic Courtès [this message]
2011-09-28 2:35 ` Noah Lavine
2011-09-28 9:25 ` Ludovic Courtès
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=874nzxpvqs.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).