This is exactly what I was trying to get at, though David Nadlinger stated it better than I did: Are we abandoning weak purity? If so, why? If not, please clarify the new rules and explain why the newly disallowed behavior doesn't fit into the framework of weak purity.<br>
<br><div class="gmail_quote">On Wed, Jul 6, 2011 at 3:57 PM, David Nadlinger <span dir="ltr"><<a href="mailto:code@klickverbot.at">code@klickverbot.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 7/6/11 9:46 PM, Walter Bright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I understand that within a pure function, such a pure function could<br>
modify locals without the caller becoming impure. But those functions<br>
are still impure.<br>
</blockquote>
<br></div>
Isn't this the whole idea behind weak purity, which we introduced in 2.050? Weakly pure functions are supposed to be able to modify their arguments, yet are still tagged with the »pure« attribute and thus callable from (possibly strongly) pure functions.<br>
<br>
Whether the implicit this parameter is part of the arguments through which external state can be read/modified is a separate another question (though I would argue in favor of it, since otherwise objects resp. member functions become unnecessarily crippled inside pure functions), but right now it seems like you are throwing the whole concept of »weak purity«, i.e. the »relaxed« purity rules out of the window. Or did I get you wrong?<br>
<font color="#888888">
<br>
David</font><div><div></div><div class="h5"><br>
______________________________<u></u>_________________<br>
dmd-beta mailing list<br>
<a href="mailto:dmd-beta@puremagic.com" target="_blank">dmd-beta@puremagic.com</a><br>
<a href="http://lists.puremagic.com/mailman/listinfo/dmd-beta" target="_blank">http://lists.puremagic.com/<u></u>mailman/listinfo/dmd-beta</a></div></div></blockquote></div><br>