Interaction of Scala and Clojure

Is there a use model for developing a project where some functions are written in clojure and some in scala? This seems theoretically possible, as they both claim to be compatibly with java and interactively interoperable with java.

One hinderance seems to be that they don’t agree about the project structure. The Leiningen directory layout seems different than the maven layout which I’ve always used in Scala. Are these really compatible? If I change a Scala function how would closure know and vice versa?

I have dabbled a little bit with this here: https://blog.michielborkent.nl/2016/07/26/clojure-from-scala/

thanks for the link. I’ll take a look. The first time I really wished I could do this was when writing a Scala program which needed to read json. The particular json was defined such that the particular values of certain keys determined the type of another key. In this case it was national boundary data. Borders were either a list of lists of points, or a list of lists of lists of points. And you had to ready another property called “type” to figure out how to parse the coordinate data. To do this in Scala was a huge effort for me. I’d much rather have just read the data in a more leniently typed language, and have the foreign function just return a list of lists of points.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.