unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: Daniel Kraft <d@domob.eu>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel <guile-devel@gnu.org>
Subject: Re: %nil once again
Date: Sun, 19 Jul 2009 19:28:22 +0100	[thread overview]
Message-ID: <87ab30bk8p.fsf@arudy.ossau.uklinux.net> (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:

>>> scheme@(guile-user)> (null? %nil)
>>> #f
>>> scheme@(guile-user)> (equal? %nil (cdr (list 1)))
>>> #f
>>
>> I believe those work in the interpreter, and so are VM bugs.  Can you
>> check that with ,o interp #t ?
>
> The first one is indeed #t with the interpreter, the second one
> not. But unfortunatly I think that the elisp equivalent of
>
> (equal?/eqv?/eq? (cdr (list 1)) nil)
>
> (don't know which predicates take the place of eq?/eqv?/equal? in elisp yet)  should indeed yield true, as a perfectly valid way to check for (null? (cdr (list 1))), right?  So it seems that in this case even the Guile interpreter does not handle empty lists as it should for elisp -- 
> or don't we need to ensure that test is true?

Hm, interesting point.  Is it a problem in practice though?  If so,
what is the practical context?

i.e. is there a lot of existing code that uses (equal ... nil) to test
for the end of a list, rather than (null ...) ?

> So no need for ensuring myself that
> all '()'s get replaced by %nil's?

I would say not - because much of the existing Scheme/Elisp design is
based on _not_ having to translate data as it passes between
languages.

Or, to put it another way, if we think that we _do_ have to accept
translating data, I think we could remove lots of special Elisp
support from the libguile core.

Regards,
        Neil




  parent reply	other threads:[~2009-07-19 18:28 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
2009-07-19 18:28     ` Neil Jerram [this message]
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=87ab30bk8p.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=d@domob.eu \
    --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).