On Fri, 2012-12-28 at 09:37 +0100, evilrat wrote:
[…]
> well one of the points of immutable data is safely sharing across 
> threads(the point there is that data once allocated doesn't 
> changes so no need to sync it), functional languages also claims 
> that they provides easy concurrency(if not "automagically"), but 
> i can't say how it's really "easy" since i mostly do imperative 
> and object programming.

Functional programming languages providing parallelism "for free" is a
deep issue. Given the computational model of graph reduction, the whole
concept of parallelism is different from that of JVM-based and native
languages. OCaml has a GIL and so cannot handle single process
multi-threaded parallelism. Haskell has real problems with parallelism
because it is lazy: without manually structuring the sparks, you get all
the computation on the master thread no mater what.  Simon Peyton Jones
and Simon Marlow have created "Data Parallel Haskell" which makes data
parallel computations in Haskell very parallel and very fast. Actor,
dataflow, CSP, fork-join style parallelism is difficult in pure
functional languages. Clojure has made best inroads on this by employing
the features of the JVM in a Lisp context.
  
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to