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

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

[Kawa-commonlisp-dev] 'NIL != '()


From: Charles Turner
Subject: [Kawa-commonlisp-dev] 'NIL != '()
Date: Tue, 7 Aug 2012 22:10:57 +0100

The following equality does not currently hold in Kawa CL

(eq 'nil '()) ;=> nil

but it should.

I'm not very confident, but I think this is because nil is looked up
in the EmptyNamespace (or current lisp package in my repository),
whereas () is processed by LispReader#makeNil, which returns
LList.Empty. Of course, the mapping in EmptyNamespace is nil =>
LList.Empty, which is confusing me, I guess you'd need a RefExp to get
the LList.Empty.

The initialisation in CommonLisp:

  public static final LList FALSE = LList.Empty;
  public static final Expression nilExpr = new QuoteExp(FALSE);

seems to point to the problem, obviously they were designed to be
different objects, which seems wrong to me, but this is code Per
wrote, so I'm not confident I understand what's happening here.

Any suggestions on how to fix this?

Charles.



reply via email to

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