3 ms·
Regions used in this way predate Rust's use of regions—they go back to the ML Kit if not earlier. There was a lot of excitement around regions when first introd
by pcwalton 7y ago
Regions used in this way predate Rust's use of regions—they go back to the ML Kit if not earlier. There was a lot of excitement around regions when first introduced, because it was thought that they obviated the need for garbage collection. Unfortunately, it didn't work out that way, and one major reason why is the one you described: you can't free objects within a region without freeing the whole region itself. This is why Rust altered the regions concept to the lifetime concept it has today.
Note that the Rust system is flexible enough to encode regions. There are some crates for this in the ecosystem, for example bumpalo.