3 ms·
Clojure offers three concurrency mechanisms: agents, atoms and refs. Agents are atoms are very easy to use and understand. They are no more complicated than Sc
by frognibble 17y ago
Clojure offers three concurrency mechanisms: agents, atoms and refs. Agents are atoms are very easy to use and understand. They are no more complicated than Scala's actors.
Clojure's refs are more complicated than Scala's actors, but Scala has no similar feature. If a Scala programmer needs the functionality in Clojure's refs, then the Scala programmer must use plain old Java concurrency.
- anonjon 17y agoI think that the immutability of Clojure data structures is also a pretty big selling point for the language w/r/t concurrency and using atoms and stuff.
- jrockway 17y agoYou can't use Clojure's libraries from Scala?
- frognibble 17y agoGood point. You probably can use the libraries from Scala. In any case, you wouldn't be using Scala's concurrency features.