From: Florian Weimer <fw@deneb.enyo.de>
To: Andreas Rossberg <rossberg@mpi-sws.org>
Cc: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Scoped Bound Resource Management just for C++?
Date: Wed, 09 Feb 2011 21:45:54 +0100 [thread overview]
Message-ID: <87sjvxszr1.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <72BF43D9-1BED-4327-955E-1A7460C18CDF@mpi-sws.org> (Andreas Rossberg's message of "Wed, 9 Feb 2011 21:10:31 +0100")
* Andreas Rossberg:
> On Feb 9, 2011, at 20.11 h, Florian Weimer wrote:
>
>>> Scope-bound resource management is inherently broken, at least
>>> without sophisticated type system support.
>>
>> If the environment supports communicating processes with separate
>> execution pointers, it is straightforward to bypass restrictions, no
>> matter how evolved the type system is.
>
> I don't know what scenario you have in mind with "separate execution
> pointers". In principle, I'm pretty certain that you could always
> define some suitable (e.g. linear) type system, if your language was
> sufficiently well-behaved.
If you have coroutines or threads with communication among them, you
can always turn type-enforced region-based handles into open handles
with an explicit close operation.
>>> 2) or it is unsafe, i.e. you can access an object after its life
>>> time has
>>> ended, with potentially desastrous effects.
>>
>> This can be made safe with type-safe memory and run-time checks. I
>> don't think this is a good excuse.
>
> True, runtime checks can deal with some of the "disastrous effects",
> but they cannot make it safe in a broader sense (e.g., type-safe in an
> interesting way), and AFAICS don't apply to memory itself as a
> resource.
Like array bounds checking, integer division or other partial
functions. 8-)
> You may argue that that is good enough, but then again, you can
> already achieve that level of assurance using higher-order
> functions.
This is mostly about syntax. There is already a very convenient
notation, but it has a resource leak.
next prev parent reply other threads:[~2011-02-09 20:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 23:57 orbitz
2011-02-09 0:46 ` Guillaume Yziquel
2011-02-09 0:48 ` Jacques Garrigue
2011-02-09 6:25 ` dmitry grebeniuk
2011-02-09 12:01 ` rossberg
2011-02-09 15:15 ` orbitz
2011-02-09 16:14 ` Gerd Stolpmann
2011-02-09 16:52 ` David Rajchenbach-Teller
2011-02-09 17:54 ` orbitz
2011-02-09 21:50 ` Jon Harrop
2011-02-10 8:10 ` David Rajchenbach-Teller
2011-02-10 10:39 ` Guillaume Yziquel
2011-02-10 10:59 ` Guillaume Yziquel
2011-02-09 19:11 ` Florian Weimer
2011-02-09 20:10 ` Andreas Rossberg
2011-02-09 20:45 ` Florian Weimer [this message]
2011-02-09 21:12 ` Andreas Rossberg
2011-02-10 21:31 ` Florian Weimer
2011-02-09 18:03 ` Jon Harrop
2011-02-09 20:47 ` Norman Hardy
2011-02-09 21:00 ` Gabriel Scherer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sjvxszr1.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=caml-list@inria.fr \
--cc=rossberg@mpi-sws.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox