Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocaml killer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michael Hicks <mwh@c...>
Subject: RE: [Caml-list] ocaml and concurrency
I don't believe the underlying language and the concurrency style are
completely orthogonal.  OCaml encourages a functional style of
programming, in which you use immutable data quite a lot.  Immutable
data does not run the risk of races.  Java, I would claim, encourages
imperative programming.  Most Java programmers I know make changes
through side effects, rather than copying the object and making
adjustments in the new version.  Doing the copy+adjustment in Java, to
make objects immutable, requires a bit more work than just assigning to
a field, since you have to make a copy constructor and call it.  In
OCaml, making something a reference and dereferencing it/assigning to it
is a bit more work than just defining a new variable with let ...

Mike

-----Original Message-----
From: owner-caml-list@pauillac.inria.fr
[mailto:owner-caml-list@pauillac.inria.fr] On Behalf Of Martin Berger
Sent: Thursday, January 29, 2004 5:38 AM
To: Vitaly Lugovsky
Cc: The Trade
Subject: Re: [Caml-list] ocaml and concurrency

>  You may want to try my mpassing library, which now lacks the
> sequental orthodox unixish message queue, but it would be easy to
> implement (going to do it soon). I'm using it heavily in a
> distributed calculations as well as in a massive agent models and
> as a simple way to program "components", and I'm quite happy I
> don't ever met in OCaml any of the most common concurrncy bugs
> I enjoyed with Java and C++.

i wonder why. ocaml essentially offers the same approaches to
concurrency as do the relevant java or C/C++ libraries.
as far as i can see, there's nothing in Ocaml's approach to shared
memory concurrency that would prevent deadlocks or lack of mutual
exclusion, and there's nothing that prevents the usual problems
with message passing, like lack of liveness. you do have more expressive
types in Ocaml, but that is orthogonal to concurrency.

martin

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives:
http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners