On 9 June 2012 18:58, Jamison Hope <jrh@theptrgroup.com> wrote:
It *seems* like that's the purpose of defaultValue in
get(Object defaultValue), right? Except that the default value is
ignored:
Yeah, I had considered implementing something "ad-hoc" like this, but
just thought it best to ask for cleaner ways.
Apropos the #!null stuff, it's more pervasive than just the result of
thread locations, there's a few places already where lisp calls a java
method returning null, which means #!null in Kawa, but it would make
more sense if it return nil in CL, () in Scheem... I imagine there are
deeper reasons for #!null, but I don't see any immediate reason why
such a translation couldn't be implemented. For the time being I'm
using
(defmacro jnullp (obj)
`(eq ,obj #!null))
The idiom is used in kawa/lib/files.scm, so I guess it's A Fact Of
Life.
However, when I pop this definition in primitives.lisp, dragons
appear. It compiles OK, but when I start up CL, I see stack traces of
the form
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
[...]
Caused by: cannot load gnu.commonlisp.lisp.primitives
at gnu.expr.Language.loadClass(Language.java:431)
at gnu.commonlisp.lang.CommonLisp.initLisp(CommonLisp.java:118)
at gnu.commonlisp.lang.CommonLisp.<clinit>(CommonLisp.java:90)
... 5 more
Caused by: primitives.lisp:135:9: unbound location eq (property
(function))
[...]
Wat? After doing this, an attempt to compile PrimOps.scm results in
the following hilarity:
PrimOps.scm:24:24: warning - error loading class clisp:boolean - Could
not initialize class gnu.commonlisp.lang.CommonLisp not found