On 10/24/12 12:50 PM, Niko Matsakis wrote:
Patrick—

I think what you're saying -1 on here is some kind of purity inference?
That doesn't seem to be what was proposed, though.

In fact, I *believe* Nathan's point was merely that it's useful
sometimes to document "purity" in order to express the intention of the
API, and that in those cases it's nice to write it explicitly, just as
it's nice to have the types of parameters and return types written
explicitly.  This does not seem to be in disagreement with what you said
about reserving the right to become impure.

Oh, in that case I totally agree. I thought Nathan was asking for the purity specified in the function signature to always match the inferred purity of the function--in particular, for the compiler to enforce that a pure function is never marked impure. That was what I was objecting to. If I misinterpreted I apologize.

Patrick

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

Reply via email to