[Haskell-cafe] (no subject)
Chris Smith
cdsmith at gmail.com
Sun Jul 31 00:48:22 CEST 2011
On Sat, 2011-07-30 at 15:07 -0700, KC wrote:
> A language that runs on the JVM or .NET has the advantage of Oracle &
> Microsoft making those layers more parallelizable.
On top of the answers you've got regarding whether this exists, let me
warn you against making assumptions like the above. There are certainly
good reasons for wanting Haskell to run on the JVM or CLR, but
parallelism doesn't look like one of them.
The problem is that the cost models of things on the JVM or CLR are so
different that if you directly expose the threading and concurrency
stuff from the JVM or CLR, you're going to kill all the Haskell bits of
parallelism. A huge contribution of Haskell is to have very
light-weight threads, which can be spawned cheaply and can number in the
tens of thousands, if not hundreds of thousands. If you decide that
forkIO will just spawn a new Java or CLR thread, performance of some
applications will change by orders of magnitude, or they will just plain
crash and refuse to run. Differences of that scope are game-changing.
So you risk, not augmenting Haskell concurrency support by that of the
JVM or CLR, but rather replacing it. And that certainly would be a
losing proposition.
Maybe there's a creative way to combine advantages from both, but it
will require something besides the obvious one-to-one mapping of
execution contexts.
--
Chris
More information about the Haskell-Cafe
mailing list