<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 7/6/2011 2:12 PM, David Simcha wrote:
<blockquote
cite="mid:CAA8CUdvQ-36SUr=iDiCnpixd+fpfJYTuqcRO66JJNEqz3P+VPA@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">On Wed, Jul 6, 2011 at 5:09 PM, Walter
Bright <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:walter@digitalmars.com">walter@digitalmars.com</a>></span>
wrote:<br>
<div> </div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
This is what I have difficulty with. Consider:<br>
<br>
pure void foo(int* p) { *p = 3; }<br>
<br>
That isn't pure, or weakly pure.<br>
</blockquote>
<div><br>
???? Yes it is. It can be called from a strongly pure
function without violating purity <br>
</div>
</div>
</blockquote>
<br>
Yes, but it is not pure itself.<br>
<br>
<blockquote
cite="mid:CAA8CUdvQ-36SUr=iDiCnpixd+fpfJYTuqcRO66JJNEqz3P+VPA@mail.gmail.com"
type="cite">
<div class="gmail_quote">
<div> (Any argument passed to foo is local to the strongly pure
function, since the arguments have to be immutable and it
can't access mutable global or static variables.) Isn't that
the definition of weakly pure? <br>
</div>
</div>
</blockquote>
</body>
</html>