On 02/08/2012 08:48 AM, Marijn Haverbeke wrote:
C++ has the same restriction. In practice I've found that it rarely comes
up.

Obviously, since const field are rare in C. In Rust, one rarely uses a
record type that doesn't have immutable fields.

Fair enough. Still:

(1) This is a type unsoundness. I think we have to fix it, because as it stands typestate means nothing -- it can be broken in the safe language.

(2) The type unsoundness notwithstanding, I think it's more logical for immutable to mean truly immutable. Right now it's possible to mutate all immutable fields.

Patrick
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to