3 ms·
Is there something preventing people from writing correct, multi-threaded apps in Clojure (and kicking Python/Rubys asses)?
by swah 14y ago
Is there something preventing people from writing correct, multi-threaded apps in Clojure (and kicking Python/Rubys asses)?
- pron 14y agoNo. Python/Ruby/Javascript don't even come close to JVM performance even without multi-threading, though.
- FreezerburnV 14y agoClojure actually has a lot of stuff in its design specifically for multithreading. Like the GP post said, Clojuer has Software Transactional Memory (STM) on top of immutable data structures to make messing up multithreaded programs hard, and you'd almost have to deliberately do so. And yes, like another reply says, Clojure (and pretty much anything that's designed well and runs on the JVM) is much, much faster than Python/Ruby by default. A lot of this has to do with the JIT compiler that Java has been working on for a long time, which Python/Ruby don't have outside of an PyPy implementation. Also Python/Ruby don't have access to actual threads by default, because it has a global lock. They run everything basically in a single thread.
- swah 14y agoThat is exactly my question. If Clojure has got great performance and great multithraeding support, why haven't it gained a greater share of the dynamic languages market?