[MLton] regions

Daniel C. Wang danwang@CS.Princeton.EDU
Fri, 01 Oct 2004 19:32:54 -0400


Stephen Weeks wrote:

> I may be too biased by so much successful use of the notions of
> liveness and space safety to see much else.  But here goes ...
{stuff deleted}
> 1. be practical
> 2. be understandable to the programmer in terms of a source program in
>    the language 
> 3. provide the programmer with a way to limit memory usage in the 
>    case that automation fails.

ahh, three points for which I will not disagree about. I think, if you want 
to complain about regions these are the issues to bring up. Safe-for-space 
satisfies 1 and 2 to a large degree. However, let me point out that 3 
typically requires adding things like weak references and other "hacks" to 
deal with things like symbol-tables and the like.

BTW does Mlton support weak references? It's been a while since I looked, 
but I don't remember seeing anything like weak references last I hacked on 
the MLton GC. :)