On Fri, 17 Dec 2010 02:42:14 -0500
bearophile <[email protected]> wrote:

> http://www.reddit.com/r/programming/comments/enajl/purity_in_d_language/
> 
> Bye,
> bearophile

I take the opportunity to question the def of weakly pure.

-1- How can this even compile?
        pure append (ref int[] a, int i) {a ~= i;}
The _only_ task of this func is to change state.

-2- Why is output writing considered an impure task? It has no influence on the 
rest/future of the program, lets reasoning easy, does not touch state.

I would like weakly pure to include output funcs, and exclude all possibilities 
to modify (non-local) state.


Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to