On 6/4/11 4:38 AM, Marijn Haverbeke wrote:
Wouldn't this A) require the field to be mutable, and B) put it in an
inconsistent state until the value is swapped back in?

Yes on (A); no on (B). You have to swap a value in of the appropriate type (including constrained types), so there doesn't seem to be anything inconsistent about it. In the case of hash tables, I was thinking we would have a special "in_use" tag variant for this purpose.

Also, I think there's a definite (and low) upper limit on how complex
we can make this without making the language unusable.

We'll have to see. I'd be curious as to how much of our code in rustc we have to change to obey these new rules.

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

Reply via email to