3 ms·
Isn't JVM and Java libraries (i.e. "batteries") the one of the main selling points of Clojure?
by zura 12y ago
Isn't JVM and Java libraries (i.e. "batteries") the one of the main selling points of Clojure?
- pjmlp 12y agoClojure also targets JavaScript and .NET as targets. One of the selling points of Clojure is that it embraces the libraries of the targeted eco-system. The Clojure community has some time ago discussed addeding conditional support, to be able to build common libraries across multiple runtimes. Similar to what Common Lisp offers.
- Tloewald 12y agoDoesn't targeting LLVM get you this kind of flexibility "for free"?
- exDM69 12y agoYes and no. It can help with different target backends (including JavaScript, not sure about JVM or .NET) but you still have to do work to make sure that the calling conventions of your language and the target's match.
- Tloewald 12y agoSure, but AFAIK many/most of the "supports Javascript" languages out there rely on emscripten, so LLVM is involved anyway. By its nature, LLVM gives you more flexibility in the long term than VMs that were intended as a final destination.
- exDM69 12y ago> Sure, but AFAIK many/most of the "supports Javascript" languages out there rely on emscripten, so LLVM is involved anyway. Yes, yes. LLVM definitely helps here. But it doesn't come "for free", which is what the GP post asked. You still need some "glue" code to make it work.
- exDM69 12y ago> Isn't JVM and Java libraries (i.e. "batteries") the one of the main selling points of Clojure? Yeah, but that only appeals to the people who are already committed to the JVM (or .NET), and that is a shrinking population. There's a whole layer of complexity to deal with managed code and OOP languages and there's a bit of a impedance mismatch between a Lisp and a Java-style library and the VM itself. For people working with native code or otherwise not in the JVM ecosystem, Clojure is not really ideal.
- pjmlp 12y ago> Yeah, but that only appeals to the people who are already committed to the JVM (or .NET), and that is a shrinking population. Looking at the enterprise world, I would say it is still growing.
- exDM69 12y agoThe enterprise world isn't exactly known for adopting new languages, JVM or not JVM. But you could provide some kind of source if you disagree, all the statistics I've seen have had Java and JVM languages in a steady downward slope for the past five years or so.
- pjmlp 12y agoThe source is the projects my employer gets and I cannot disclose. It is a international consulting company that does large IT projects, mostly multi-site. You can imagine the possible candidates. We only get JVM (only Java) and .NET (C# / VB.NET) requests for proposals for greenfield projects. Any other platform requests tend to be pure data spikes.
- threeseed 12y agoCouldn't disagree more. I work in the enterprise space and there are plenty of companies using Groovy, Scala, Clojure as well as Python/Ruby on the JVM. I know it's anecdotal but what platform do you actually think enterprises are using ? Companies are looking for cheaper options so .Net isn't exactly on fire.