kawa-commonlisp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Kawa-commonlisp-dev] Switching to Guile's #nil


From: Charles Turner
Subject: Re: [Kawa-commonlisp-dev] Switching to Guile's #nil
Date: Sat, 22 Jun 2013 15:32:14 +0100

On 21 June 2013 08:57, John Cowan <address@hidden> wrote:
> Per Bothner scripsit:
>> One could make "better Scheme/Lisp compatibility" a configuration
>> option.  Not clear what the default should be.  Of course one
>> might argue that interpreting #!null as false and allowing it as the
>> end-of-list are "friendlier" and less surprising, even to pure Scheme
>> programmers.
>
> Indeed, and I think it should be the default for that reason.  If
> it turns out that (eq? x '()) is actually faster, then it can be
> added to the performance hints.

Another Scheme/CL compatibility issue I ran into was the unspecified
behaviour of (if <test> <consequent>) when <test> is #f. Various
derived expression types like WHEN and UNLESS which use such a
one-armed IF statement do not translate cleanly between Scheme and CL,
since in CL it is standardised to return NIL instead of undefined
behaviour (which I happen to find is a very pragmatically convenient
default, but perhaps not as clean semantically.) Perhaps in Kawa we
should treat #!void as false too, since that's the default in Kawa for
this unspecified case, or even better imo, default to #f.

I don't understand why this is unspecified behaviour in the Scheme standards.

Kind regards,
Charles.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]