From: Andreas Rottmann <a.rottmann@gmx.at>
To: Daniel Kraft <d@domob.eu>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel <guile-devel@gnu.org>,
Neil Jerram <neil@ossau.uklinux.net>
Subject: Re: %nil once again
Date: Fri, 17 Jul 2009 16:20:21 +0200 [thread overview]
Message-ID: <87k527v1ay.fsf@delenn.lan> (raw)
In-Reply-To: <4A603E36.7080100@domob.eu> (Daniel Kraft's message of "Fri, 17 Jul 2009 11:02:46 +0200")
Daniel Kraft <d@domob.eu> writes:
> Hi Neil,
>
> Neil Jerram wrote:
>> Daniel Kraft <d@domob.eu> 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/>
next prev parent reply other threads:[~2009-07-17 14:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 13:47 %nil once again Daniel Kraft
2009-07-17 7:59 ` Neil Jerram
2009-07-17 9:02 ` Daniel Kraft
2009-07-17 14:20 ` Andreas Rottmann [this message]
2009-07-19 18:28 ` Neil Jerram
2009-07-19 19:44 ` Daniel Kraft
2009-07-19 20:10 ` Neil Jerram
2009-07-20 3:33 ` Ken Raeburn
2009-07-20 8:12 ` Daniel Kraft
2009-07-20 9:15 ` Ken Raeburn
2009-07-23 22:18 ` Andy Wingo
2009-07-20 18:17 ` Clinton Ebadi
2009-07-30 21:38 ` Neil Jerram
2009-07-31 5:03 ` Daniel Kraft
2009-07-23 20:35 ` Andy Wingo
2009-07-24 6:20 ` Daniel Kraft
2009-07-30 21:50 ` Neil Jerram
2009-07-31 5:05 ` Daniel Kraft
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=87k527v1ay.fsf@delenn.lan \
--to=a.rottmann@gmx.at \
--cc=d@domob.eu \
--cc=guile-devel@gnu.org \
--cc=neil@ossau.uklinux.net \
--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).