News for hackers. Stuff that matters.
Re:Stacked Borrows: An Aliasing Model for Rust by maikklein_dev on Sunday February 09, 2020 @05:36AM (#22281434)
If I understood it correctly, it just turns undefined behavior regarding aliasing into compiler errors
Re:Stacked Borrows: An Aliasing Model for Rust by hyperman1 on Sunday February 09, 2020 @12:59PM (#22283358)
My take on this: There are certain properties all rust code should have.

In safe rust, the compiler gives a mathematical proof this is so. In unsafe code, the compiler does not, but still assumes these properties are holding. The burden to make sure everything is correct falls on the shoulders of the programmers.

But nobody knows exactly what these properties are. There is a big part known, but the edges are fuzzy. So unsafe code is required to follow rules nobody knows.

This effort is part of the work to clarify the rules. If accepted, both the compiler and unsafe programmer knows how far they are allowed to go

Re:Stacked Borrows: An Aliasing Model for Rust by littlestymaar on Sunday February 09, 2020 @05:04PM (#22284632)
That's a really good summary, thank you.
Re:Stacked Borrows: An Aliasing Model for Rust by GolDDranks on Sunday February 09, 2020 @06:33AM (#22281609)
No, it doesn't. There's a set of rules that are proven to have a set of desirable properties (from the viewpoint of compiler optimisations and programmer freedom, in a reasonable balance), and an accompanying interpreter that checks those rules, and turns undefined behaviour regarding aliasing into _runtime_ errors.
Re:Stacked Borrows: An Aliasing Model for Rust by notriddle on Sunday February 09, 2020 @03:41PM (#22284174)
No, it doesn't. Stacked Borrows can only be checked at runtime.

What it is, is a formal specification for something like an UB Sanitizer.