<div dir="ltr">On 8 April 2013 23:01, John Colvin <span dir="ltr"><<a href="mailto:john.loughran.colvin@gmail.com" target="_blank">john.loughran.colvin@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Monday, 8 April 2013 at 12:39:58 UTC, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 8 April 2013 21:53, Iain Buclaw <<a href="mailto:ibuclaw@ubuntu.com" target="_blank">ibuclaw@ubuntu.com</a>> wrote:<br>
<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 8 April 2013 12:41, 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 Monday, 8 April 2013 at 09:41:52 UTC, Iain Buclaw wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It uses some type information, eg:<br>
<br>
const/immutable/wild -> qualified const.<br>
shared -> qualified volatile.<br>
shared + const/wild -> qualified const/volatile.<br>
<br>
<br>
</blockquote>
const/wild can be muted via aliasing. I'm not sure how GCC's backend<br>
understand const, but this seems unclear to me if this is correct.<br>
<br>
<br>
</blockquote>
GCC's backend is pretty much C/C++ semantics. So the const qualifier is<br>
shallow, and does not guarantee that no mutations will occur.<br>
<br>
</blockquote>
<br></div></div><div class="im">
But D makes no further guarantee. I don't see how const in D is any<br>
different than const in C++ in that sense? That's basically the concept of<br>
const, it's not a useful concept for optimisation, only immutable is.<br>
</div></blockquote>
<br>
D const is transitive, surely that makes a difference/presents an opportunity?<br>
</blockquote></div><br></div><div class="gmail_extra" style>No, I think that just makes it 'safer', or as many might say, "more annoying" ;)</div></div>