[m-dev.] for discussion: stream library v2

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 29 15:15:35 AEDT 2000


On 29-Sep-2000, Michael Day <mcda at students.cs.mu.oz.au> wrote:
> 
> > Oh, now I remember what the problem with that was.
> > The problem is that when the exception is thrown, the
> > value currently in the store may be completely invalid --
> > there is no guarantee in general that it even has the right type.
> 
> So it's semantically legitimate but difficult/impossible to implement with
> the current compiler?

Actually, no, it would mostly work OK with the current compiler,
since the current compiler doesn't do compile time garbage collection /
structure reuse / destructive update.
But it would not work for future versions of the compiler,
e.g. the one on the `reuse' branch that Peter Ross and
Nancy Mazur have been working on.
It would also cause problems for user code which does compile time GC /
structure reuse / destructive update using `pragma c_code' or the like.
Even the current implementation does do some destructive update and
compile-time garbage collection for arrays, and so that would cause
problems.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list