[Issue 8408] Purity calculation should be improved
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 9 07:24:09 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8408
--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2012-09-09 07:24:46 PDT ---
(In reply to comment #2)
> This rule makes more functions (tagged as pure) become strongly pure, this is
> positive.
Thanks. But, I've been filed this as a part of issue 8409, so the pull request
doesn't cover all cases.
> On the other hand for the programmer it's increasingly harder to know if a
> function is weak pure or strongly pure just looking at it.
I think it is not so difficult if you summarize it.
- If the function can modify function argument through its parameters, it is
weakly pure.
- If the function arguments don't appear in the part of the returned value, or
the returned value is not a part of arguments, then it is strongly pure.
- Otherwise, it is constant pure.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list