[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Move ambitus print callback to scheme
From: |
David Kastrup |
Subject: |
Re: [PATCH] Move ambitus print callback to scheme |
Date: |
Sun, 30 Aug 2009 07:51:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Carl Sorensen <address@hidden> writes:
> On 8/28/09 10:56 PM, "David Kastrup" <address@hidden> wrote:
>
>> Carl Sorensen <address@hidden> writes:
>>
>>> On Aug 28, 2009, at 1:16 PM, "Nicolas Sceaux" <address@hidden>
>>> wrote:
>>>
>>>>
>>>> According to R5RS, it is an error to modify a literal list.
>>>> If a function returns '(), the caller won't be allowed to
>>>> apply a modifying function on the result (eg. append!)
>>>>
>>>
>>> IIUC, '() is not a literal list, but a constant that represents the
>>> empty list.
>>
>> It is a literal list in my opinion, but one that happens to have no
>> unique and/or modifiable conses. Append will work just fine on it.
>
> It is *not* a literal list.
>
> Here is the proof:
>
> guile> (define a '(4 5))
> guile> (define b '(4 5))
> guile> (eq? a b)
> #f
> guile> (define c '())
> guile> (define d '())
> guile> (eq? c d)
> #t
>
>
> '(4 5) is a literal list, and thus a is not eq? to b, although it is equal?
> to b
Huh? What kind of argument is that supposed to be?
(define a 4)
(define b 4)
(eq? a b)
Would you claim that 4 is not a literal integer?
'() is literal (namely explicitly specified) and it is a list (namely a
cons or nil).
'() is not a literal _cons_, and it is not unique. But it certainly is
literal (a spelled out value) and a list.
> On the other hand, c is eq? to d, because '() is a constant, and both c and
> d are set to the same constant.
I think you are just confused about the meaning of "literal".
--
David Kastrup
- [PATCH] Move ambitus print callback to scheme, Neil Puttock, 2009/08/19
- Re: [PATCH] Move ambitus print callback to scheme, Neil Puttock, 2009/08/25
- Re: [PATCH] Move ambitus print callback to scheme, Carl Sorensen, 2009/08/26
- Re: [PATCH] Move ambitus print callback to scheme, Han-Wen Nienhuys, 2009/08/27
- Re: [PATCH] Move ambitus print callback to scheme, Neil Puttock, 2009/08/27
- Re: [PATCH] Move ambitus print callback to scheme, Nicolas Sceaux, 2009/08/28
- Re: [PATCH] Move ambitus print callback to scheme, Carl Sorensen, 2009/08/28
- Re: [PATCH] Move ambitus print callback to scheme, David Kastrup, 2009/08/29
- Re: [PATCH] Move ambitus print callback to scheme, Nicolas Sceaux, 2009/08/29
- Re: [PATCH] Move ambitus print callback to scheme, Carl Sorensen, 2009/08/29
- Re: [PATCH] Move ambitus print callback to scheme,
David Kastrup <=