Skip to content

Comment on Clojure for the Erlang VMparent

Comments

The Clojure community believes strongly in the idea that it is a hosted language, and therefore prioritizes maintaining the semantics of its host (whether that be the JVM, a JS engine, or some other VM) over independent, consistent semantics for Clojure itself.

That being said they've made some concessions to the fact that it would be really nice to have portable Clojure code with `.cljc` files, but those are only portable Clojure code by matter of convention (the only technical thing `.cljc` files accomplish is allowing you to use reader conditionals).

Personally, I wish Clojure went further. Even with the commitment to being a hosted language, it still is clunkier at interop than Scala or Kotlin, two languages which nonetheless do have independent semantics as specified in their respective language specifications. It kind of seems you end up with the worst of both worlds (worse interop and no consistent semantics), although to be fair Clojure also commits far more heavily to the FP paradigm than Kotlin or even Scala, which makes it intrinsically more difficult to have seamless interop with Java (yes yes yes its interop with Java is already quite good, just not quite at the level of the others).

Yeah, I’ve developed some clj/cljs code. It’s full of conditional compilation. It’s even full of conditional compilation expressions in the ns header.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.