From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p1AB0L4I017385 for ; Thu, 10 Feb 2011 12:00:21 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai4QAIVUU01V2gB5Zmdsb2JhbACXTI4yDQsICBIkug4NhU8Ej0U X-IronPort-AV: E=Sophos;i="4.60,451,1291590000"; d="scan'208";a="99628000" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail1-smtp-roc.national.inria.fr with SMTP; 10 Feb 2011 12:00:15 +0100 X-Alinto-smtpauth-localdomain: Yes Received: from seldon (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 336598343A4; Thu, 10 Feb 2011 12:00:12 +0100 (CET) Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1PnUFd-0006SL-1F; Thu, 10 Feb 2011 11:59:53 +0100 Date: Thu, 10 Feb 2011 11:59:52 +0100 From: Guillaume Yziquel To: orbitz@ezabel.com Cc: caml-list@inria.fr Message-ID: <20110210105952.GX17055@localhost> References: <50AF76A1-30E0-4735-AFB2-88BB603899CE@ezabel.com> <77df810e993b3002f8b97622102da8dd.squirrel@mail.mpi-sws.org> <20110210103953.GU17055@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20110210103953.GU17055@localhost> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p1AB0L4I017385 Subject: Re: [Caml-list] Scoped Bound Resource Management just for C++? Le Thursday 10 Feb 2011 à 11:39:53 (+0100), Guillaume Yziquel a écrit : > Le Wednesday 09 Feb 2011 à 10:15:43 (-0500), orbitz@ezabel.com a écrit : And even with all that has been mentioned, there isn't really a way to avoid the fact that closures may still hold on to your value. > Otherwise you would need to refine the type system of OCaml to include > information as to whether an argument can be attached to another > datastructure inside a given function. I do not see why it could not be > done, but I do not see why it should be done. That's perhaps the only way to avoid closures from holding to your value, by forbidding partial evaluation, and enforcing full evaluation. But that's way overkill. -- Guillaume Yziquel