Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Clojure is a lisp like language hosted on top of the JVM. By running on top of node you get a faster startup which is desirable for short lived apps.


sort by: page size:

Clojure is a hosted language - it runs on the CLR and in JS/Node too.

That said, the JVM is wonderful and Clojure is the best way to access it.


Clojure, because it is Lisp, run on the JVM, node and browser.

Technically, Clojure can run on a number of platforms, but in practice, Android and such, JVM startup is too slow.

I do love cljs though, since it can run on mobile, node (including aws lambda), browser etc.


The big Clojure use-case for me has been Java interop. Aside from that, I'm not sure I'd prefer it to node.

Of course, I have no idea what your use-cases look like . . .


Clojure runs on JVM.

Clojure is a hosted language, today it can host on top of JVM, JS, BEAM or .NET CLR engine. It also can interop with Python code. Getting it to run on CL runtime was just a matter of time.

Cool, I wanted to use Clojure on the Raspberry Pi, but the startup time is very slow, due more to loading the core Clojure libraries than the JVM.

It makes writing a Clojure web server really impractical on the Pi. I considered using clojurescript for the server, but ended up just going back to node for my project.


There are a few fast startup JVMs out there that will run Clojure code.

Clojure has the advantage of targeting the JVM and Js runtimes. These are two most popular runtimes for writing web apps currently. Clojure can also be easily integrated into existing projects on these platforms.

Clojure is on JVM and it can be used with your favorite Java server.

My only problem with Clojure is the terrible JVM start up time.

While I agree that for typical long running applications like web servers/web applications this isn't really an issue, the problem manifests itself when you want to write small scripts or small command line applications that have similar performance to their Java equivalent.

If you write a CLI app in Java, the application will execute almost instantly as soon as you run it, but with languages like Clojure/Scala you have to wait a long time.


Nice to see, but I'm still sad Clojure is a hosted JVM language. I find it unwieldy for a lot of things where Go, Python and Chicken Scheme shine, and wish someone got ClojureScript to run natively in things like Bun or Deno so I could have one fast, small runtime.

Clojure is popular for these exact reasons. Clojure apps are deployed like any Java app, and they can access the huge library of Java.

Java also deploys an image that needs to be executed in a runtime, but the industry is so familiar with the JVM that it is a moot point.


The JVM is an excellent general purpose, multi-threaded runtime, with a large ecosystem of open source libraries, and its well suited to many types of "back-end" workloads, which is why it was the initial target for Clojure back in 2006/2007. Clojure's great interop with its host platform made it easy for people to get up and running while leveraging all the existing Java libraries they were used to.

The JVM is still a great choice for all those reasons, but its a little heavier than Node.js which specializes in IO bound use cases (i.e. the back-end-for-front-ends that sit between the browser and the heavyweight back-end systems). Node.js is also probably better suited for smaller services, lambdas, and other light-weight scenarios (IOT?).

I'm interested in promoting a full-stack approach to ClojureScript because the JavaScript/Node.js ecosystem is everything that the Java ecosystem was 15 years ago. It has lots of developers, lots of libraries, and a "bad" language. And by sticking with Node.js, its one less hurdle for JavaScript developers to clear when learning ClojureScript. They still get to use all the same libraries they did before (via ClojureScript's great interop), and the runtime characteristics they are used to. Plus, if they then decide to start looking at Clojure on the JVM in the future, they will have already learned the language.


If you just hate the JVM, Clojure was designed in such a way that it could be hosted on many VMs which is nice. As others have pointed out, it can run on BEAM VM or even V8 with Clojurescript I believe.

Interesting. Why not use Clojure which runs on the JVM?

In this case, Clojure is already running on the JVM

Clojure user here. The java-ness is actually an advantage, because you can easily cater to all JVM-hosted languages.

"Clojure would be a nice environment to work with if it wasn't running on JVM. It renders Clojure a resource hog, and the startup time is awful. A big no-no for most of my use cases."

Then don't use it, right? There are plenty of use cases for which Clojure makes sense, and where running on the JVM is a perk.

next

Legal | privacy