3 ms·
Clojure has a good ecosystem and you can fall back to Java's ecosystem if needed. It has excellent support for json, and acceptable async support (I use manifo
by synthc 6y ago
Clojure has a good ecosystem and you can fall back to Java's ecosystem if needed. It has excellent support for json, and
acceptable async support (I use manifold + aleph, but there are other options). It runs on the JVM which has world class GC.
- ssivark 6y agoI want to understand the complementary picture. Assuming Clojure as a good default, what would be some specific kinds of tasks/problems for which one might wish to avoid Clojure? And what alternatives would you recommend, for those cases? (be it another lisp, or otherwise)
- piranha 6y agoI wouldn't use Clojure if fast startup time is important for you. So it's okay for servers, but not okay for (in general case) for command line tools. With GraalVM this is changed a bit, but then compilation of non-trivial projects with GraalVM is also non-trivial. If you need a low memory consumption then Clojure is also not a great choice. We've built an ecommerce site on Clojure though and it's been great. :)
- slifin 6y agoWhen considering Clojure like this it's important to remember that Clojure has many runtimes It is designed to be hosted, so, a lot of the above doesn't apply equally for ClojureScript (as one example)
- elwell 6y ago> not okay for (in general case) for command line tools Babashka° is worth a look. ° https://github.com/borkdude/babashka https://github.com/borkdude/babashka
- shivekkhurana 6y agoSCI or Small Clojure Interpreter is a subset of Clojure meant for quick startup. Babashka is a library on top of SCI and is particularly suited to building command line tools. It doesn't need the JVM, starts up in milliseconds, has access to a large part of clojure.core (including core.async) and can be downloaded as a 13mb binary. https://github.com/borkdude/babashka https://github.com/borkdude/babashka
- hellofunk 6y agoClojure is not the best choice if you have a lot of number crunching code, unless you like writing Java.
- thom 6y agoDepending on your needs, I have generally found that between Fastmath and Neanderthal, I have no real worries about performance sensitive numeric code. Obviously if you start caring about CPU caches and specific instructions then you might struggle (I am writing a chess engine in Clojure for no good reason, and obviously it's not going to hit the level of throughput that engines written in C++ reach). There are annoying niggles, like Clojure not supporting all Java's primitive types, and obviously the wider support ecosystem for data science work is somewhat weak, but I've been impressed.