[armedbear-devel] Seamless ABCL / Java integration proposal

Blake McBride blake at mcbride.name
Wed Feb 20 17:26:19 UTC 2013


I only looked briefly at JSS but quickly formed a, possibly unfounded,
opinion as follows

The appearance of the calls looks special and awkward.  In my case, nearly
every line will be a call into my Java libraries.  This would render the
lisp code maximumly awkward, ugly, and difficult to read.  The solution I
had up to this point made the lisp code natural and native looking.

I think the JSS code is nice if you have a few places you need to link into
and didn't want to write the interface code.  Using ABCL as an extension
language to a large application is an entirely different story.

In terms of returning lists and arrays, I have many places where, for
example, a method would return a list of records.  Using it as a lisp list
when in lisp of very natural and works well with things like loop.  Having
to call Java to iterate through lists and arrays is, again, unnecessarily
unnatural.

I think using that extension to clos I proposed could solve my problem but
would be complicated to get working right.  I lean towards changing ABCL's
REPL.  It would work as it does now but if it can't find a function, it
automatically tries finding a Java method before issuing a function not
found error message.  I think this would be pretty easy to implement and
would automatically eliminate most interface code requirements, and render
the interface natural to lisp.

Thanks.

Blake


On Wed, Feb 20, 2013 at 5:08 AM, Mark Evenson <evenson at panix.com> wrote:

>
> On Feb 19, 2013, at 1420 , Blake McBride <blake at mcbride.name> wrote:
>
> > Lest there be any confusion, I deeply appreciate the ABCL system and all
> those who contribute to it.
>
> From my side, I didn't intend my message to seem defensive, more
> just a clarification of points that I have expressed to people, but
> not on the mailing list.  And posts like yours are quite welcome.
>
> I'm still pondering how to answer your proposals, but it is taking a long
> time to find the time.
>
> Just two quick points:
>
> 1.  Have you looked at JSS as Alessio suggests?  Can you comment
> as to how it meets your numbered points?
>
> 2.  Changing the call/return values from the Java FFI in changing
> java.lang.List to/from Lisp CONS as well as Java array to/from Lisp
> arrays would break existing code that expects otherwise.  Any ideas
> on how to migrate?
>
> --
> "A screaming comes across the sky.  It has happened before but there is
> nothing to compare to it now."
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20130220/649cbef3/attachment.html>


More information about the armedbear-devel mailing list