[Issue 11046] [enh] Pure functions with default and out parameters are allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 16 09:33:06 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11046



--- Comment #8 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-09-16 09:33:03 PDT ---
> The issue was _not_ about banning all pure functions with out parameters for
> which there are default values, but about not taking into account module scope
> of default argument. This is essentially the same issue (dmd does not check
> status) you reported but with a better test case.

Well, then you needed to have been clearer in the title and description of the
issue. "Pure functions with default and out parameters are allowed!" says
nothing about global variables, and while the default argument in the example
happens to use a global variable, the text that goes with it talks about
modifying the arguments, not about global variables, and the fact that a pure
function can modify its arguments is completely acceptable. It's just a weakly
pure function rather than a strongly pure one in that case.

-- 
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