[armedbear-devel] Integration of CL and Java

Alan Ruttenberg alanruttenberg at gmail.com
Fri Jul 31 22:50:13 UTC 2009


I will put a word in for my package jss, which I have used for quite a
bit of development (e.g. the inspector I mentioned in a previous
email, as well as LSW, also mentioned).

Jss calls are all dynamic dispatch, and explicit imports are not
necessary. Classpath can be dynamically added to.

Here is an example of code that uses jss.

(defun make-swing-window-for-panel (name panel)
  (let* ((w (new 'javax.swing.JFrame name))
	 (content-pane (#"getContentPane" w)))
    (#"add" content-pane panel)
    (#"pack" w)
    w))

Source code is at:
http://svn.mumble.net:8080/svn/lsw/trunk/jss/

Regards,
Alan

On Fri, Jul 31, 2009 at 6:18 PM, Tobias C. Rittweiler<tcr at freebits.de> wrote:
>
> To incite some discussion about what steps are required to make it
> convenient to write Java from within CL. The result should probably be
> added to Trac.
>
>  Short term:
>
>    * make Java objects inspectable.
>
>    * make DESCRIBE be useful on Java objects. Should mention
>      inheritance tree, public attributes, and methods.
>
>    * fix inconsistencies, for example JMETHOD takes class-name first,
>      then method-name, but JSTATIC takes it the other way around.
>
>  Medium term:
>
>    * make JMethods be a subclass of FUNCALLABLE-INSTANCE, so they can
>      be funcalled, passed to HOFs, stored into SYMBOL-FUNCTION etc.
>
>    * add reader-macros for convenience. For example, #J'class.method
>      for (jmethod "class" "method").
>
>    * add iteration macro, HOFs, for Java Collections.
>
>    * Figure out how to get arglist information from Java methods.
>
>    * Documentation
>
>    * Useful PRINT-OBJECT methods for Java Objects. For example,
>      Collection objects could be printed showing their content,
>      e.g. #<JAVA-CLASS COLLECTION [a b c d e]>. Make sure to make it
>      heed the printer variables properly, though.
>
>  Long term:
>
>    * Add an extensible sequence protocol, and make Java Collection
>      abide it.
>
>    * integrate Java's object hierarchy into the CLOS object
>      hierarchy. I'm not a CLOS expert, but a few people come to mind
>      who to ask.
>
>    * Make it possible to extend Java classes from Lisp.
>
>    * Make it possible to implement Java interfaces from Lisp.
>
> People who have experience with Clojure, and other Lisp-like languages
> on the JVM are welcomed to chime in how other do the integration, and
> how they like it.
>
> Also people who have opinions how they'd like it to look like.
>
>  -T.
>
>
> _______________________________________________
> armedbear-devel mailing list
> armedbear-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>




More information about the armedbear-devel mailing list