From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p19Km0gI009802 for ; Wed, 9 Feb 2011 21:48:00 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvEFAGKMUk1ii1tQZGdsb2JhbACXOo4lGgoLFgUhvAeFXASEf4oj X-IronPort-AV: E=Sophos;i="4.60,447,1291590000"; d="scan'208";a="87749728" Received: from nm10.bullet.mail.sp2.yahoo.com ([98.139.91.80]) by mail4-smtp-sop.national.inria.fr with SMTP; 09 Feb 2011 21:47:54 +0100 Received: from [98.139.91.70] by nm10.bullet.mail.sp2.yahoo.com with NNFMP; 09 Feb 2011 20:47:53 -0000 Received: from [98.139.91.10] by tm10.bullet.mail.sp2.yahoo.com with NNFMP; 09 Feb 2011 20:47:48 -0000 Received: from [127.0.0.1] by omp1010.mail.sp2.yahoo.com with NNFMP; 09 Feb 2011 20:47:48 -0000 X-Yahoo-Newman-Id: 558387.38710.bm@omp1010.mail.sp2.yahoo.com Received: (qmail 44976 invoked from network); 9 Feb 2011 20:47:48 -0000 Received: from 172.16.1.34 (norm@75.36.172.92 with plain) by smtp128.sbc.mail.sp1.yahoo.com with SMTP; 09 Feb 2011 12:47:48 -0800 PST X-Yahoo-SMTP: 6wM9MhqswBCJxy9jDcYebttHhXX021oP4RUg3aXahuvJwcSQLA-- X-YMail-OSG: bdIIJR8VM1l.NJowkt8f5xOlkvLIJtfmoQqvvKm5ex8Co3e 18bxjAbVolAr33NQVWhpHZcbvE4z.hdKm5CSj1KDsEja31RpcDkWzQ7jmvJY LaxZypIkkgU3adFaC0HhYaRwoXPYPV3s60JBcqJOL1mISij3VfrG47.DaYE1 kCf34wWIfSCvLlYWtUOPWYx6bB90yd3z2icxt2wUYkRq6poPnBoBc2nwblOe 7pD7.nSSWWXwcEOjqy8TgkWbp28Sh1FfTMbICuEi55T57Hi2ViXfJtZAqHeK jia4SyuZUGCwrY96_97.XJ.im_k79srmXcDnRb3o- X-Yahoo-Newman-Property: ymail-3 References: <50AF76A1-30E0-4735-AFB2-88BB603899CE@ezabel.com> In-Reply-To: <50AF76A1-30E0-4735-AFB2-88BB603899CE@ezabel.com> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=windows-1252 Message-Id: <06339C3C-7F90-47F9-895D-3E2CA49A4C5F@cap-lore.com> Cc: caml-list@inria.fr From: Norman Hardy Date: Wed, 9 Feb 2011 12:47:47 -0800 To: orbitz@ezabel.com X-Mailer: Apple Mail (2.1082) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p19Km0gI009802 Subject: Re: [Caml-list] Scoped Bound Resource Management just for C++? On 2011 Feb 8, at 15:57 , orbitz@ezabel.com wrote: > One of the benefits, in my opinion, of C++ is SBRM. You can reason about the lifetime of an object and have an give yourself guarantees about its clean up. The method of initialization and clean up are also consistent for every object in the language. > > My questions are: > 1) Do other people in the FP world consider this to be a good strategy? > 2) Can this be done in a sane way in a GCd language? > 3) What are the alternatives in a language like Ocaml? Keykos was a platform intended for program agents from diverse and even hostile interests. http://cap-lore.com/CapTheory/KK/ It had an adversarial space allocation technology. http://cap-lore.com/CapTheory/KK/Space.html It was an operating system with a space allocation facility that was both safer and less safe than GC. It was safer in that it was feasible to write applications therein safe from space exhaustion. It was less safe in that programming errors might delete space too soon. It did not suffer, however, from ‘memory safety’ errors when ‘stale pointers’ were used. The behavior of stale pointers was determined and ‘threw exceptions’ by default. Lurking forgotten references that were indeed destined not to be used were not a problem as in GC. Releasing storage was explicit and indeed an extra additional application burden. It was also possible for the agent paying for the storage to reclaim the storage despite access by others. The allocation mechanisms were responsible for space on timescales from milliseconds to years. Many complex agreements on data access between parties, positive and negative, were possible in Keykos, and enforced by mutually trusted software agents therein.