3 ms·
>First, this means using a programming language built for concurrency. At present, there are two such languages in wide(ish) use: Erlang[2] and Clojure. How ex
by papsosouid 14y ago
>First, this means using a programming language built for concurrency. At present, there are two such languages in wide(ish) use: Erlang[2] and Clojure.
How exactly does clojure qualify while go and haskell do not?
- pron 14y agoOh, Haskell qualifies, it's just not in wide(ish) use yet. Also, I don't know whether it supports mutable concurrent constructs (as Clojure does with refs and STM). Without those you don't have concurrent writes. As for Go, it allows sharing of mutable state, and so does not prevent races and does not make it clear when modifications to said mutable state are visible. It supports concurrency well but is not built around it.
- papsosouid 14y ago>Oh, Haskell qualifies, it's just not in wide(ish) use yet. Seems to be more widely used than clojure. >Also, I don't know whether it supports mutable concurrent constructs Yeah, Control.Concurrent.STM has vars, queues, channels, etc.
- mtrimpe 14y agoClojure runs on the JVM which means that it's 'politically usable' in many more places than Haskell
- papsosouid 14y agoYes, that is certainly the theory. Have you seen that actually happen in practice? Java shops almost exclusively continue to use java, and refuse to allow the dozens of other jvm languages. Every measure I can find shows haskell is more widely used than either clojure or erlang.
- tlack 14y agoCan you share your Haskell vs. Erlang data?
- papsosouid 14y agoJust the usual suspects (redmonk, langpop, tiobe).
- deleted 14y ago[deleted]
- banachtarski 14y agoAs a professional practictioner of all 3, haskell is emphatically not used more widely than clojure or erlang.
- papsosouid 14y agoHow does being a "professional practictioner of all 3" qualify one to make that assertion? And how do you reconcile that with the fact that every objective measure available shows otherwise?
- banachtarski 14y agoLink to the objective measures? The qualification is admittedly subjective but Haskell is not as practical for use in many use cases, whereas Erlang fits a niche very well, and the others (scala, clojure) are more general purpose. My assertion is based on what I know all my peers in the industry to be working on, and the sizes of the projects they are working on. If you have more data than this empirical data set, I'm all ears. Edit, I see you reference tiobe and langpop. This is a horrible* way of assessing industry usage, just fyi. Niche languages for example, may see relatively small general usage, but may be the de facto answer to a particularly type of problem. Many people use Erlang to solve their concurrency problems. Few use haskell (although that part is improving and I love haskell a lot).
- robertfw 14y agoit will also be dead simple to integrate with spacebase, which is java
- regularfry 14y agoI don't dispute that this is true, but I still don't understand it. How have we got to a state where native code isn't politically acceptable?
- seanmcdirmid 14y agoNative code is just too expensive to write/maintain and is not justified unless you need the extra constant factor performance it gives you, which is quite unrelated to scalability. In this case, at least, industry seems to be doing it right. C++ is reserved for the industries that really need it (gaming, embedded) and enterprise work focuses more on programmer productivity instead.
- regularfry 14y agoSo Haskell is damned with C++'s brush despite being safer than Java...
- seanmcdirmid 14y agoHaskell is completely managed, its not very native at all. They have a garbage collector right? Since everyone is compiling to native instructions these days, GC (and the memory safety required for it) is about the main difference. At the end of the day, each one of your VMs are running on hardware, the point about Clojure being JVM-friendly is more about ecosystem and interop then some efficient execution concerns. You could say Haskell is interoperable with everything and nothing, and be right on both counts.
- regularfry 14y ago> the point about Clojure being JVM-friendly is more about ecosystem and interop then some efficient execution concerns. If you had only written that, you wouldn't have been downvoted. Almost everything else you've written here is wrong.
- BrokenEnso 14y agoThe RedMonk ranking from September 2012 [1] seems to contradict your statement about Haskell prevalence. Note, it edges out Erlang on both metrics. [1] http://redmonk.com/sogrady/2012/09/12/language-rankings-9-12/ http://redmonk.com/sogrady/2012/09/12/language-rankings-9-12...
- deleted 14y ago[deleted]
- fghh45sdfhr3 14y agoWhat is RedMonk, and how is their ranking less B.S. than rankings according to Netcraft?
- deleted 14y ago[deleted]
- jvanenk 14y agoHaskell has marvelous concurrent constructs. It's actually one of the few places where I end up thinking "wow, I'm glad I get to use threads here" and I'm not thinking it sarcastically. http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc/html/Control-Concurrent.html http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc... http://hackage.haskell.org/packages/archive/stm/2.4.2/doc/html/Control-Concurrent-STM.html http://hackage.haskell.org/packages/archive/stm/2.4.2/doc/ht...
- sbov 14y agoWith OTP it's pretty easy to make an Erlang program with race conditions.
- lucian1900 14y agoIndeed. All 4 are reasonably mature, have excellent concurrency and parallelism stories and have been used practically for this purpose. The author is right about there being few languages that do this, though.
- carterschonwald 14y agoHaskell BEAUTFIFULLY qualifies, its just that STM and the other abstractions have been in GHC since around 2005-2007, so they're hardly "novel" in that community.