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 CBC2BBC32 for ; Mon, 7 Mar 2005 04:31:10 +0100 (CET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j273VARf020329 for ; Mon, 7 Mar 2005 04:31:10 +0100 Received: by rproxy.gmail.com with SMTP id g11so1838403rne for ; Sun, 06 Mar 2005 19:31:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=H1nC9bVw6Q02/aplDc6xNaP6OxjpBNnuRG6sD3QnrR8p3xhNCiKSqO2G+3qCF3vJl/xdwHjO+hqAdO+/yxljDhUdu8n8DqPSmFa6XUA1AbQM5WHRxmgknfr4Bxv/eJGkBHJ8357cPlcMp7lrJmaLPK6TT/oONvVCGGym8RWfKck= Received: by 10.38.24.51 with SMTP id 51mr169893rnx; Sun, 06 Mar 2005 19:31:09 -0800 (PST) Received: by 10.38.86.60 with HTTP; Sun, 6 Mar 2005 19:31:09 -0800 (PST) Message-ID: <877e9a1705030619314605334c@mail.gmail.com> Date: Sun, 6 Mar 2005 22:31:09 -0500 From: Michael Walter Reply-To: Michael Walter To: Jon Harrop Subject: Re: [Caml-list] exception safety / RAII ? Cc: caml-list@yquem.inria.fr In-Reply-To: <200503070003.52747.jon@jdh30.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <293072a520e3724a0497e6456a8675be@mac.com> <200503070003.52747.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 422BCAFE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 garbage:01 finalizers:01 wrote:01 exception:01 inclusion:03 context:04 problem:05 problem:05 michael:07 michael:07 seem:07 i'm:08 wrong:08 object:09 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: On Mon, 7 Mar 2005 00:03:52 +0000, Jon Harrop wrote: > > The C++ solution to this problem > > is a technique called Resource Acquisition Is Initialization. > > This is a poor man's alternative to garbage collection. The principal problem > is the inability to determine what object owns which resources at any given > point in the code. I'm not sure one should think of it as a "poor man's" solution or an "alternative to GC". An indication to that could be the inclusion of "using" into C#. Another indication could be the inelegance of finalizers (or as well the trouble people seem to have using them -- I wouldn't blame a wrong (read: C++) context as a cause for that). Michael