[armedbear-devel] ABCL introductory user documentation
alessiostalla at gmail.com
Thu Jul 30 07:48:09 UTC 2009
On Thu, Jul 30, 2009 at 2:38 AM, Paul Reiners<paul.reiners at gmail.com> wrote:
> Some introductory user documentation I wrote on ABCL if anyone's
> It's spread across a bunch of slides right now, because I first
> prepared it as a multi-slide presentation. I think I want to combine
> it all into one HTML page later this week when I get around to it. At
> the very least, I want to give each slide a meaningful title so that
> the Table of Contents is more meaningful.
> Any criticism, constructive or destructive, is welcome.
Good work! It's nice to see introductory documentation for abcl.
Now the (constructive) criticism part :) I found an inaccuracy on
Slide 10, regarding boxing/unboxing of values. Indeed boxing and
unboxing is done automatically by ABCL. In your case, had you wrapped
your ints in Fixnums instead of JavaObjects, you could have used them
directly in Lisp. In general, since the user can't be expected to know
how to map every Java type to Lisp and vice-versa, there are a couple
of nice methods you can use in all cases:
public static LispObject JavaObject.getInstance(Object, boolean)
converts (or wraps) a Java object to a Lisp object, if the boolean is
true (else it just wraps it in a JavaObject).
public Object LispObject.javaInstance()
converts (or unwraps) a Lisp object to Java. You can invoke this on
any Lisp object, if it can't be converted, it will be returned as-is.
More information about the armedbear-devel