Syntactic sugar to call Java from ABCL?
evenson at panix.com
Sat Mar 5 09:02:08 UTC 2016
On 2016/3/4 18:54, EGarrulo wrote:
> Hello ABCL developers,
> has anybody written some macros to make calling Java from ABCL more
> straightforward? I mean something that, instead of this code from the ABCL
> (defun void-function (param)
> (let* ((class (jclass "Main"))
> (intclass (jclass "int"))
> (method (jmethod class "addTwoNumbers" intclass intclass))
> (result (jcall method param 2 4)))
> (format t "in void-function, result of calling addTwoNumbers(2, 4): ~a~%"
> would let you write something like this, for example:
> (format t
> "in void-function, result of calling addTwoNumbers(2, 4): ~a~%"
> ;; Let's imagine that we have defined a -> macro.
> (-> |Main.addTwoNumbers| 2 4)
abcl-1.3.3 currently includes code in the ABCL-CONTRIB mechanism for two
such additional syntaxes, namely [JFLI-ABCL] and [JSS].
One may load these packages by
I don't really know much about JFLI, but use JSS extensively.
The example of
(-> |Main.addTwoNumbers| 2 4)
(#"addTwoNumbers" 'Main 2 4)
"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