3 ms·
>unless you run in an isolated heap Yes, Haskell already has per-OS-thread heaps, and there's not really any need for isolation since everything is immutable a
by wyager 12y ago
>unless you run in an isolated heap
Yes, Haskell already has per-OS-thread heaps, and there's not really any need for isolation since everything is immutable and GCed anyway.
>many years battle tested VM system
The VM is an implementation detail, not a feature. But yes, the GHC RTS is basically a VM.
>libraries built for concurrency and fault tolerance
Yes, Haskell has those. Specifically, libraries work no matter how they're being executed (concurrently or otherwise), and they're fault tolerant in the sense that error conditions are encapsulated in the type system and the libraries do not generally crash.
>It is a fork-join or just a plain thread+queue.
Well, not necessarily. I can express an actor however I want. Haskell forks aren't like regular C forks; they're much more flexible. It's basically the same thing as Actors in Erlang. The thread only gets picked up when something happens to a resource it's waiting on (like actors in Erlang).
>The winner in concurrency is system that has most fault tolerance tooling built in.
Well, Haskell has excellent fault tolerance support, but the recommended programming style is just to never crash, which is an entirely reasonable request when you're writing in Haskell.
>"Millions of concurrent" threads are useless if the crash of one brings down the rest.
There's no particular reason it would. See the `catch`, `handle`, etc. combinators for how to deal with errors in Haskell (although again, it's recommended just to write programs that don't crash).