Version française
Home     About     Download     Resources     Contact us    
Browse thread
exception safety / RAII ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Charles Forsyth <forsyth@t...>
Subject: Re: [Caml-list] Re: exception safety / RAII
>>I'm not a GC-expert, but it seems obvious to me, that a GC frees
>>ressources at unspecified time and that also means at unspecified
>>time in respect to the code that is executed.

i was going to keep out of this, but i suppose i won't.
	it seems obvious to me, that a GC frees
	resources at unspecified time
not necessarily: it is perfectly possible to define a language so as
to define as predictable those things that could be made predictable,
and then rely on that when programming.  that places the onus
on the implementation to do that, of course, and i suppose that
might result in inefficiency, but perhaps that can be traded off
against other things.  garbage collectors exist that can do that,
with reasonable efficiency in many contexts.
i've used for years a system that behaves
in just this way, and it works well, particularly when faults occur.

i'm not saying this approach is a universal panacea,
or that it's appropriate for caml, just that it is certainly feasible,
and it can work well in practice.  ``but will it work in theory?''
good question.