
On 12/02/2010 15:45, John Van Enk wrote:
I _think_ that the abstract points out that reference-counted garbage collection can be done deterministically. Haskell could some day be an excellent replacement for C/Ada in safety critical markets, but some serious changes to the RTS (most having to do with memory allocation, garbage collection, and multi-threading) would have to be made.
If the GC becomes deterministic, then a much better case can be made for using the language on a plane or in medical devices.
In a sense the GC *is* deterministic: it guarantees to collect all the unreachable garbage. But I expect what you're referring to is the fact that the garbage remains around for a non-deterministic amount of time. To me that doesn't seem to be a problem: you could run the GC at any time to reclaim it (pause-times notwithstanding). Even if you collected garbage immediately, I wouldn't feel comfortable about claiming any kind of deterministic memory behaviour for Haskell, given that transformations performed by the compiler behind your back can change the space usage, sometimes asymptotically. If you have to have guaranteed deterministic memory usage, perhaps something like Hume[1] is more appropriate? Cheers, Simon http://www-fp.cs.st-andrews.ac.uk/hume/index.shtml