News for hackers. Stuff that matters.
Re:Rust is more than safety by softc on Thursday December 29, 2016 @04:00AM (#13276380)
Good point. Some responses:

Function calls themselves can force something like "x = 1" if x is observable from the callee.

In the case where "x = 1" is not observable from the catch block, then there is no effect. In cases where you would use "try!" in Rust, in the equivalent C++ cases the catch block wouldn't be able see local variables since it would be in a parent function call.

I think LTO largely eliminates this issue altogether since function bodies are visible to the optimizer in that case.

There are no comments on this comment yet.