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 6C113BC48 for ; Mon, 7 Mar 2005 16:21:58 +0100 (CET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.197]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j27FLv7M020532 for ; Mon, 7 Mar 2005 16:21:58 +0100 Received: by rproxy.gmail.com with SMTP id g11so2029980rne for ; Mon, 07 Mar 2005 07:21:57 -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=tJmf4Er3/wcDOzX44NYYWfHE/Qglf/ePO1xHtdqPHu/ATg9KblbZo5QsRNXzDlWsMlhz/ZosbgSQLzSxtNVOKrLnWX4gp9YbrcNrDEZjNk2r5Vs7yAOytCrixhJr9WodPK9E+IWiBAYgBcdj4NXLnhlOWenEmqQVSvLScals+54= Received: by 10.38.59.61 with SMTP id h61mr81287rna; Mon, 07 Mar 2005 07:21:56 -0800 (PST) Received: by 10.38.86.60 with HTTP; Mon, 7 Mar 2005 07:21:56 -0800 (PST) Message-ID: <877e9a170503070721b2e0298@mail.gmail.com> Date: Mon, 7 Mar 2005 10:21:56 -0500 From: Michael Walter Reply-To: Michael Walter To: Jon Harrop Subject: Re: [Caml-list] Re: exception safety / RAII ? Cc: caml-list@yquem.inria.fr In-Reply-To: <200503071330.49084.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> <874qfofdho.fsf-monnier+gmane.comp.lang.caml.inria@gnu.org> <200503071330.49084.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 422C7195.003 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 finalizers:01 finalisers:01 finalizer:01 wrote:01 exception:01 objects:02 deallocate:03 inclusion:03 context:04 referencing:07 finaliser:07 referencing:07 michael:07 michael:07 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 13:30:48 +0000, Jon Harrop wrote: > > 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#. > > I don't know C#, but when would you want to deallocate a resource before all > references to it have disappeared? I never had such a desire. > > 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). > > How are finalisers inelegant? Apart from referencing an object from its own > finaliser, what problems do people have? Referencing other objects from a finalizer. Michael