From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1BAD2BC48 for ; Wed, 9 Mar 2005 08:29:36 +0100 (CET) Received: from first.in-berlin.de (dialin-145-254-065-041.arcor-ip.net [145.254.65.41]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j297TXRe024500 for ; Wed, 9 Mar 2005 08:29:35 +0100 Received: by first.in-berlin.de (Postfix, from userid 501) id BA03EB5674; Tue, 8 Mar 2005 22:32:36 +0100 (CET) Date: Tue, 8 Mar 2005 22:32:36 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: exception safety / RAII ? Message-ID: <20050308213236.GC1877@first.in-berlin.de> References: <293072a520e3724a0497e6456a8675be@mac.com> <200503070003.52747.jon@jdh30.plus.com> <874qfofdho.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org> <200503071330.49084.jon@jdh30.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200503071330.49084.jon@jdh30.plus.com> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce with ID 422EA5DD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oliver:01 bandel:01 oliver:01 in-berlin:01 caml-list:01 garbage:01 ....:98 ....:98 ...:98 wrote:01 wrote:01 exception:01 writes:01 filesystem:02 rarely:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.3 required=5.0 tests=DATE_IN_PAST_06_12, FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Mon, Mar 07, 2005 at 01:30:48PM +0000, Jon Harrop wrote: > On Monday 07 March 2005 01:32, Stefan Monnier wrote: > > > In most cases you probably won't care when a file is closed after writing > > > to it, so you can just rely on the garbage collector. > > > > Very bad practice in (e.g.) an NFS world where the filesystem makes no > > guarantee about file writes until you actually close the file. > > Yes, this may go wrong under certain circumstances (it is not a guarantee) but > I very rarely have problems with this. Building reliable programs on unreliable assumptions will definitely yield to problems. Not during development, not during tests, but when the software finally is used. (Murphey....) So, buying that piece of code.... and your customers will wish they better had bought the product from the other company... Ciao, Oliver