From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA26781; Thu, 29 Jan 2004 12:51:48 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA26873 for ; Thu, 29 Jan 2004 12:51:47 +0100 (MET) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0TBplP27739 for ; Thu, 29 Jan 2004 12:51:47 +0100 (MET) Received: from hicks (pcp04425488pcs.nrockv01.md.comcast.net[69.140.137.0]) by comcast.net (sccrmhc12) with SMTP id <200401291151460120053us2e> (Authid: kimberleymhicks); Thu, 29 Jan 2004 11:51:46 +0000 From: "Michael Hicks" To: "'The Trade'" Subject: RE: [Caml-list] ocaml and concurrency Date: Thu, 29 Jan 2004 06:51:48 -0500 Message-ID: <000401c3e65e$46ebaaf0$6401a8c0@hicks> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <4018E282.2040404@dcs.qmul.ac.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 Importance: Normal X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 orthogonal:01 immutable:01 immutable:01 2004:99 vitaly:01 lugovsky:01 caml-list:01 lacks:01 ocaml's:01 passing:01 liveness:01 expressive:01 orthogonal:01 bug:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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