4 ms·
Clojure 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
by FreezerburnV 14y ago
Clojure 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?