[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %nil once again
From: |
Andreas Rottmann |
Subject: |
Re: %nil once again |
Date: |
Fri, 17 Jul 2009 16:20:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) |
Daniel Kraft <address@hidden> writes:
> Hi Neil,
>
> Neil Jerram wrote:
>> Daniel Kraft <address@hidden> writes:
>>> I think I got the test-suite as well as a basic macro implementation
>>> (the compiler framework is really cool, that was fairly easy to do);
>>> recursive macros do not yet work, but otherwise it looks fine.
>>>
>>> However, I want to tackle quasi-quotes (besides others) now; and in
>>> Elisp %nil is not only #f of Scheme but also the end-of-list marker (I
>>> guess that's why simply using Scheme's #f for %nil does not work).
>>>
>>> I did some experiments, and it seems that Scheme respects it partially:
>>>
>>> scheme@(guile-user)> `(1 2 3 . ,%nil)
>>> (1 2 3)
>>>
>>> (is %nil in Scheme a variable because it needs the unquote?)
>
Yes (although I'd say you need the unquote because you want to access
the variable, not the other way around </nitpick>).
>>
>> Do you mean why don't we just use the symbol nil? If so, the answer
>> is because in Scheme, (cons 'a 'nil) should be (a . nil), not (a).
>
> No, I mean why '(1 2 3 . %nil) does yield (1 2 3 . %nil) while `(1 2 3
> . ,%nil) gives the expected (1 2 3). But that does not matter much
> besides astonishing me, as this is only something related to the
> Scheme implementation of %nil, I guess.
>
The *symbol* '%nil has absolutely no special status in Scheme. It just
happens that Guile provides (in the default environment) a value bound
as %nil that has special properties.
Regards, Rotty
--
Andreas Rottmann -- <http://rotty.yi.org/>
- %nil once again, Daniel Kraft, 2009/07/16
- Re: %nil once again, Neil Jerram, 2009/07/17
- Re: %nil once again, Daniel Kraft, 2009/07/17
- Re: %nil once again,
Andreas Rottmann <=
- Re: %nil once again, Neil Jerram, 2009/07/19
- Re: %nil once again, Daniel Kraft, 2009/07/19
- Re: %nil once again, Neil Jerram, 2009/07/19
- Re: %nil once again, Ken Raeburn, 2009/07/19
- Re: %nil once again, Daniel Kraft, 2009/07/20
- Re: %nil once again, Ken Raeburn, 2009/07/20
- Re: %nil once again, Andy Wingo, 2009/07/23
Re: %nil once again, Clinton Ebadi, 2009/07/20