On Apr 29, 5:07 pm, Randall R Schulz <[EMAIL PROTECTED]> wrote: > Hi, > > I don't know if this question is appropriate, so if not, please ignore > it and accept my apologies for being off-topic. > > I am setting out to add scriptability to a largish and relatively > mature, though still evolving, Java application. The application is a > theorem prover and it operates on formulas expressed in the CLIF > notation, about which it's enough to know that it's syntactically a > Lisp-like language. > > Because of this I'd like to use a Lisp dialect to add scripting. Right > now, I'm looking mostly at SISC and Kawa. > > So my question is this: What sort of analysis should I be making to > select between these two? > > One thing I'll point out is that there will be quite a lot of > interaction across the boundary between the scripting language and the > existing Java application. I.e., there will be a lot of functions or > methods that can be invoked on the scripting side to gather information > about and manipulate the content being operated on and to initiate > problem execution on the Java side. > > I mention this because if it's tedious to make any given bit of > Java-side functionality accessible to the scripting side, that will be > a negative. > > Lastly, if there are other Lisp-like scripting languages that integrate > well with Java, I'd like to hear about them, too. My research suggests > that while many such projects have been created, not many are actively > developed or are very complete implementations of Lisp (or Scheme). >
Hi Randall, I recommend you also take a look at Clojure. While not Scheme or Common Lisp, it is functionally rich, and has a number of advantages over a 'standard' Lisp in the Java environment, particularly as regards interoperability: It shares the Java type system. For instance Clojure strings are Java strings (that can't be true of any standard Lisp where strings are mutable). Clojure collections implement java.util.Collection. Clojure has a large sequence library (first/rest/map/filter/reduce/ take/drop etc) that is defined on an abstraction rather than cons cells, and as such works on all Clojure data structures as well as Java strings, Java arrays, and any Java Iterable collection or Enumerator. Clojure uses Java's calling conventions and call stack. Clojure closures (fns) implement Callable, Runnable and Comparator. All Clojure data types are represented by a well-factored set of Java interfaces that are easy to consume from Java. Clojure compiles to JVM bytecode and has excellent performance. It supports optional type hints and simple inference that allow it to avoid reflection. Clojure supports standard Java debug information. Clojure's math library works directly with Java's boxed Number types, including BigInteger and BigDecimal, adding only a Ratio type of its own. Clojure has a clean and intuitive Java call interface: user=> (def s "foobar") #'user/s user=> (s.replace "o" "e") "feebar" The net result is much more of an integrated feel than one language bridging to another. You can find out more at: http://clojure.org Regards, Rich --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
