On 2/7/2012 4:27 PM, Patrick Walton wrote:
On 2/7/12 4:23 PM, Graydon Hoare wrote:
Hm. I am confused at the description of the "hole" in the type system. I
was under the impression that this was the distinction between immutable
values and immutably-rooted values (those contained within a
path-of-immutable-references). Am I misunderstanding?

It's not a hole per se, but our concept of immutability is pretty unique
among languages I know of. (C++ doesn't work this way, in particular.)
Moreover, our notion of immutability makes it more difficult than it
could be to prevent Dan's bug.

Really? I think our concept quite closely mirrors most languages that mix mutable and immutable types. Either can nest in either, and saying something is mutable or immutable is only a statement about one level of nesting.

It *used* to do deep immutability analysis when assigning kinds. But it doesn't do that anymore. Now it only does deep immutability analysis when looking at reference safety. Which, I think, it kinda has to.

Or are you saying that it's rare to do *that* deep analysis? I agree with that. I also think it's one of our more pleasant features. Other systems must either defer to "the GC keeps everything alive" or "any reference can become invalid at any moment" (C++).

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

Reply via email to