On 2/17/19 11:40 PM, Henri Sivonen wrote:
> Rust, which combines the
> perf benefits of -fstrict-aliasing with the understandability of
> -fno-strict-aliasing?

This is not really true of Rust.  Rust's memory model is not really defined yet 
https://doc.rust-lang.org/reference/memory-model.html but from what I've been 
able to read as to how you're "supposed" to and "should" use the language in 
unsafe code and through FFI, it *does* require the same sorts of things as C++ 
in "you can't dereference a pointer/reference unless it contains a well-formed 
value of the type of the pointer/reference".  Just, Rust has somewhat more 
tools that hide away this unsafety so you don't often manually bash on memory 
yourself in that manner.

As a practical matter, I don't honestly see how Rust can avoid having a memory 
model very similar to C++'s, including with respect to aliasing, even if 
they're not there *formally* yet.

Jeff
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to