[armedbear-devel] multidimensional java arrays?

Mark Evenson evenson at panix.com
Fri Feb 7 09:12:49 UTC 2014

> On Feb 6, 2014, at 2:52, Cyrus Harmon <ch-lisp at bobobeach.com> wrote:
>> I can work around this by creating a new java array myself (and populating it appropriately), but this is no fun. Is this the intended behavior?

I’ve attached a [patch to ticket #347][1] that no longer converts multi-dimensional Java arrays to Lisp vectors of Java arrays, instead returning the primitive Java object.

I am not sure that I currently understand all the ramifications of changing this behavior, as there may be cases where this change makes things harder rather than easier, especially where people really want to be dealing with Lisp sequences rather than using a returned value for further Java calls.  I don’t know specifically of any code or tests for which this change may be incompatible, as people tend to keep their “bridging to Java” ABCL code private.  

Can you please test to see if this does what you want?  And help me think through whether this is the right way forward for everyone?  I suppose the alternative to changing the Lisp side value would be to “squash” a Lisp sequence of Java arrays down to the equivalent multi-dimensional Java array when calling into Java.  Performing such a “squash” when calling into Java would have the virtue of preserving existing behavior.

[1]: http://abcl.org/trac/attachment/ticket/347/jarray-convert.diff

"A screaming comes across the sky.  It has happened before but there is nothing 
to compare to it now."

More information about the armedbear-devel mailing list