On Jun 22, 2009, at 3:45 PM, Wilson MacGyver wrote: > that seems very hard to do.
I wrote some code that called Clojure from Jython just to see if it would work. All you have to do is use :gen-class to compile it and call it as though it's Java. I haven't used Scala so I'm not sure what its like calling Java from Scala but it shouldn't be any different than calling methods on any other Java object. I don't think this can interfere with Clojure's concurrency model, since it's implemented atop Java's concurrency primitives. > How would you grantee no side effect from other languages? Not sure you have to. Clojure's variables/refs/atoms/agents/etc. do not expose their contents in a writeable way without going through their APIs. I'm pretty sure Clojure doesn't mind if calling external code results in side effects on the other side, and stuff on the other side can't manipulate Clojure's immutable types as though they are mutable due to Java's access protection mechanism. You would have to worry about side-effects happening on the other side during Clojure transactions that got replayed though. — Daniel Lyons --~--~---------~--~----~------------~-------~--~----~ 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 Note that posts from new members are moderated - please be patient with your first post. 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 -~----------~----~----~----~------~----~------~--~---