2 ms·
In particular, you can hide a bounded stack in a State monad, so you could prevent the thing from leaking unbounded memory without any garbage collector magic a
by weel 19y ago
In particular, you can hide a bounded stack in a State monad, so you could prevent the thing from leaking unbounded memory without any garbage collector magic at all. I guess it would be nice if you could bound the total heap rather than one particular stack in your program, but I don't think that in practice that would justify the added complexity in the garbage collector. It would be interesting, though, and that has been known in the past to be sufficient reason for people to try and extend Haskell...