Hi,

I know that all Java GUI libraries can be used within the REPL, but it is my
understanding that in order to make it self-contained and executable (a jar
or a class file), it is necessary to write some Java and call the Clojure
code from the java applet or application.  Is this true, or am I doing it
wrong?

I know a lot more about Common Lisp than I know about Java by the way, so I
end up having to figure out Java stuff sometimes in order to do certain
things in Clojure...

Another question I have has to do with the applet model and mutable state.
It seems like an applet's required architecture forces you to do things less
idiomatically and make use of globally defined agents or refs that change.
To give an example from the applet I am writing (but this is general across
almost all applets I would think), the paint function in Clojure (called by
the paint method of the java applet) receives a graphics object.  Meanwhile
the mouseDown function receives the coordinates of the pointing device, does
something, and calls repaint.  Mousedown function therefore is expected to
modify some globally defined state so that repaint can use it in
repainting.  Would I be wrong to assume that this forces a
Clojure-unfriendly structure onto the Clojure applet?

So if I am right about these two facts, it seems like Clojure should include
a native way of making applets/applications that both enables the truly
functional style that Clojure is built on, and doesn't require writing Java
to call it (it seems like Clojure should replace Java, not perpetuate it,
other than to build on its vast libraries, IMHO).  What do you think (and is
there something I'm understanding wrong here)?

Rob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to