From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 7B807BB81 for ; Tue, 7 Mar 2006 18:44:46 +0100 (CET) Received: from consign.cs.umd.edu (consign.cs.umd.edu [128.8.128.61]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k27HiiEj031596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 7 Mar 2006 18:44:46 +0100 Received: from [172.16.3.131] (gala.cs.umd.edu [172.16.3.131]) (authenticated bits=0) by consign.cs.umd.edu (8.12.11/8.12.5) with ESMTP id k27HigwP011258 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO) for ; Tue, 7 Mar 2006 12:44:43 -0500 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <81CF6C03-B3F4-4962-9918-E80CDCE8D254@cs.umd.edu> Content-Transfer-Encoding: 7bit From: Michael Hicks Subject: Re: [Caml-list] STM support in OCaml Date: Tue, 7 Mar 2006 12:44:57 -0500 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.746.2) X-CSD-MailScanner-Information: Please email staff@cs.umd.edu for more information X-CSD-MailScanner: Found to be clean X-CSD-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.82, required 5, autolearn=disabled, ALL_TRUSTED -2.82) X-MailScanner-From: mwh@cs.umd.edu X-Miltered: at concorde with ID 440DC68D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 -mike:01 ocaml:01 library':01 arrays:01 haskell:01 enclosing:01 semantics:01 beginner's:01 beginners:01 bug:01 herself:98 wrote:01 caml-list:01 caml-list:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DNS_FROM_RFC_ABUSE autolearn=disabled version=3.0.3 There's a longer answer, but one short answer is: check out AtomCaml at http://www.cs.washington.edu/homes/miker/atomcaml/ -Mike On Mar 7, 2006, at 11:50 AM, Sebastian Egner wrote: > > > Are there any plans to add STM to OCaml? And I'm talking highly > integrated > > into the language, not just some bolt-on library. > > I implemented 'some bolt-on library' as you call it for > myself (for understanding the details of STM) but did > not release it. The main lesseons I learned, however, are > > a) A library will be nearly as good as something 'highly > integrated into the language'. The main difference is > that you cannot annotate fields to be transactional, > and define transactional record types; you need to > work with explicit transactional reference boxes and arrays. > This appears tolerable, and it is a lot simpler, both in > terms of implementation and in terms of using it. > > b) The version of STM as designed for Haskell makes essential > use of laziness for composing transactions in a very clean > way. You can construct more and more complex transactions > by not yet enclosing them into 'atomic'. This is probably > the most important benefit of STMs at all. Unfortunately, > this property is essentially impossible in OCaml: No matter > how highly integrated STMs are in the language, it will > always be easy to write a program that uses ordinary (non-STM) > state to keep a record of something it shouldn't---messing > up semantics of course. > > Sorry, I know this is bad news, but that is what I found. > I invite everybody to verify this for him- or herself, > or prove me wrong. > > Sebastian. > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs