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.)
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to