applicability of instance? on Java array types?

Hoehle, Joerg-Cyril Joerg-Cyril.Hoehle@t-systems.com
Thu Dec 4 15:13:00 GMT 2003


Hi Kawa users,

o how to check for (typep my-obj <byte[]>)?

There is this function in Kawa:

:instance? value type			Function
: Returns #t iff value is an instance of type type. (Undefined if type is a
: primitive type, such as <int>.)

Isn't <byte[]> also a primitive type?

#|kawa:6|# (instance? (Base64:decode "ABCD") <byte[]>)
#t
by chance or necessity? Maybe the doc needs clarification.

;(define-namespace Base64 "class:org.apache.xerces.impl.dv.util.Base64")


o Thanks for the explanation on (integer? 1.0) -> #t
I have little experience with Scheme outside of Kawa, Oaklisp or Scheme within
Common Lisp (as in Peter Norvig's or Paul Graham's books), whose numeric tower
obviously follows Common Lisp numbers.

Regards,
	Jorg Hohle



More information about the Kawa mailing list