[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32
From: |
Ludovic Courtès |
Subject: |
Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32 |
Date: |
Tue, 27 Sep 2011 22:37:31 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Hi,
Andy Wingo <address@hidden> 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... :-)
- Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32, Mark H Weaver, 2011/09/24
- Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32, Ludovic Courtès, 2011/09/25
- Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32, Andy Wingo, 2011/09/26
- Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32,
Ludovic Courtès <=
- Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32, Noah Lavine, 2011/09/27
- Re: GNU Guile branch, stable-2.0, updated. v2.0.2-101-gd851e32, Ludovic Courtès, 2011/09/28