Pure not acting pure.

Charles McAnany mcanance at rose-hulman.edu
Thu Jun 16 10:38:27 PDT 2011


Ok, I think I get it. That cleared it up. =).
So, if you have a functioned labelled pure, it's your job to not pass it mutable arguments, but the compiler's job to
make sure it doesn't mutate anything not in the arguments. And that's why a strongly pure function can call a weakly
pure one - only the first function's internal state can be mutated by a weakly pure function.
Thanks!


More information about the Digitalmars-d-learn mailing list