Re:Rust and the Future of Systems Programming [video]
by dikaiosune on Wednesday November 16, 2016 @04:05PM
(#12971508)
> if you can live with the wasted memory use of objects outliving their conceptual lifetime, regions/arenas are a good solution.
If you can live with the wasted memory use of objects outliving their conceptual lifetime, garbage collectors can be a good solution too.
Not that that's a bad thing for many use cases, but your above comment implies a comparison between Rust and GC. I think the quoted critique falls down a bit when Rust lets you opt-in to generational-esque GC-ish behavior with a very similar downside to what you'd get from a GC.
Note however that you'd probably still have to run destructors when destroying an arena (to free file handles for instance), so you can still see high latency. With an arena you can perhaps schedule this better though.