News for hackers. Stuff that matters.
Re:Removing garbage collection from the Rust language by pcwalton on Monday June 03, 2013 @12:14PM (#5814072)
> The runtime can figure out heap vs stack. Progressively better over time. Definitely better than I can do.

Not really true: when you get into higher order control flow it's a huge mess and usually escape analysis falls down. The Rust lifetime system allows stack allocation to a greater extent than any escape analysis system I know of.

That said, we've thought about doing escape analysis, but usually you don't need it in Rust: people reach for the garbage collector only when it's absolutely needed anyway, so having the compiler promote GC allocations to stack allocations automatically would only help in a tiny fraction of cases.

There are no comments on this comment yet.