<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 April 2013 11:09, Simen Kjærås <span dir="ltr"><<a href="mailto:simen.kjaras@gmail.com" target="_blank">simen.kjaras@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, 11 Apr 2013 12:03:38 +0200, deadalnix <<a href="mailto:deadalnix@gmail.com" target="_blank">deadalnix@gmail.com</a>> wrote:<br>

<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thursday, 11 April 2013 at 08:36:13 UTC, Joseph Rushton Wakeling wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 04/10/2013 08:39 PM, Walter Bright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure there is. Declare the function as pure, and the function's parameters as<br>
const or immutable.<br>
</blockquote>
<br>
Sure, I accept that.  What I was meaning, though, was an up-front declaration<br>
which would make the compiler shout if those necessary conditions were not met.<br>
<br>
i.e.<br>
<br>
       pure foo(int n) { ... }     // compiles<br>
<br>
       strong pure bar(int n) { ... } // compiler instructs you to make<br>
                                      // variables const or immutable<br>
</blockquote>
<br>
Both are strongly pure.<br>
</blockquote>
<br></div></div>
That's not the point. The point is, if he'd written this:<br>
<br>
  strong pure bar(int* n) { ... }<br>
<br>
The compiler would have said 'Bad programmer! int* is not implicitly<br>
castable to immutable!'<span class="HOEnZb"><font color="#888888"></font></span><br clear="all"></blockquote></div><br></div><div class="gmail_extra">Great, just what we need.  A compiler that barrages the user about how bad his code is, then dies...<br>
<br></div><div class="gmail_extra"></sarcasm><br></div><div class="gmail_extra"><br>-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';
</div></div>