News for hackers. Stuff that matters.
Re:The Road to Rust 1.0 by tomp on Tuesday September 16, 2014 @09:07AM (#8324256)
You could do escape analysis equivalent to Rust's only if you inlined all the functions. Sometimes, that's simply not possible, e.g. with separate compilation.

On the other hand, Rust is still able to perform its kind of escape analysis (via lifetime-tracking type system), because the relevant facts are embedded in type signatures of Rust functions, and as such must be present even for separate compilation (even if the actual implementation of the function is unknown).

Re:The Road to Rust 1.0 by pkolaczk on Tuesday September 16, 2014 @10:54AM (#8324774)
VM could do see all the functions and do whole-program analysis. Inlining is an orthogonal concept.
Re:The Road to Rust 1.0 by pcwalton on Tuesday September 16, 2014 @11:13AM (#8324878)
You could in theory, but that analysis would likely be really slow.

In any case, without the type system and compiler to enforce the discipline the programmer is going to lose a lot of control and predictability.

Re:The Road to Rust 1.0 by pkolaczk on Tuesday September 16, 2014 @12:18PM (#8325270)
Not necessarily. As you said, Rust encodes that information in type signatures. Exactly the same information can be used in a VM and it could do escape analysis one method at a time then.
Re:The Road to Rust 1.0 by tomp on Tuesday September 16, 2014 @12:30PM (#8325345)
That's true. Maybe it would work, but I wonder if anyone has attempted it before...