Am 24.10.2012 um 05:49 schrieb Jesse Ruderman <[email protected]>:

> Should functions default to pure?
> 
> * With 
> http://smallcultfollowing.com/babysteps/blog/2012/10/12/extending-the-definition-of-purity-in-rust/
> I think most functions will be able to be pure.
> 
> * Would avoid the problem of forgetting to mark a function as pure,
> causing pain for a caller.  (Or worse, causing the compiler to
> generate slower code?)
> 
> * Would encourage writing pure code, by making pure less typing than impure.
> 
> * With 
> http://smallcultfollowing.com/babysteps/blog/2012/10/23/function-and-object-types/
> the "impure" and "unsafe" modifiers would move in the same direction.
> (Currently, "pure" and "unsafe" move in opposite directions from the
> default, which is impure.)

I like that idea very much except that there are probably situations in which 
one wants the reverse, i.e.
modules marked as impure which then requires purity annotations for functions.

boggle.






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

Reply via email to