4 ms·
Now you have Clojure which runs on the JVM and interops nicely
by dimitar 5y ago
Now you have Clojure which runs on the JVM and interops nicely
- elwell 5y agoAnd ClojureScript to interop with JS ecosystem.
- Scarbutt 5y agoI wouldn't call it "nicely", there is lot of stuff that makes it really tedious. The bigger issue though is wasting time wrapping Java libraries and most comments I see about Clojure interop talk as if there is no cost to it. Clojure has good foundations but the ecosystem never really developed.
- finalfantasia 5y ago> The bigger issue though is wasting time wrapping Java libraries and most comments I see about Clojure interop talk as if there is no cost to it. You are not forced to "waste time" wrapping Java libraries. As a matter of fact, thanks to the interop features that are well thought out, using Java libraries directly via the interop is encouraged and preferred to wrappers (Java Time API is a good example.) You may _choose_ to write wrappers for Java libraries if they make consuming these libraries in your code a bit nicer. > Clojure has good foundations but the ecosystem never really developed. There's no separate ecosystem for Clojure(Script). The established ecosystems such as JVM, .NET, and JavaScript _are_ the Clojure ecosystem. The creator of Clojure(Script) realized that it would be practically impossible to build an ecosystem from scratch without significant investment (Sun spent billions of marketing dollars alone in Java) and thus deliberately chose to make Clojure(Script) a language hosted on well-developed platforms such as JVM, .NET, and JavaScript. Also because of this focus on being a hosted language, he went to great lengths to ensure the interop with its hosting platforms is as seamless as possible. If you need an example for awkward interop with Java, try Scala.
- dimitar 5y agoYou are not forced by the language to wrap libraries. In fact "Programming Clojure" by some of the authors says the following: "Clojure embraces java and its libraries. Idiomatic Clojure code calls Java libraries directly and doesn't try to wrap everything under the sun to look like Lisp. This surprises make new Clojure developers but is very pragmatic. Where Java isn't broken, Clojure doesn't fix it" So the ecosystem is a superset of the Java and JS ecosystems, which are pretty developed. I do agree that the cost of required to know 2 or 3 languages is real though.
- adamc 5y agoThank you for articulating my (limited) experience. It was a very leaky abstraction. I remember thinking "If this is it, Python wins."
- bitwize 5y agoABCL and Kawa have that advantage as well, without the strange "Lisp is nice, but..." design philosophy of Clojure.