<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-02-10 0:15 GMT+09:00 via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday, 9 February 2015 at 13:19:24 UTC, Tobias Pankrath wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Monday, 9 February 2015 at 12:39:06 UTC, Marc Schütz wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It does? Not according to my tests. And it would be bad if it did, because the returned immutable value could actually reside in read-only memory.<br>
</blockquote>
<br>
join returns a mutable array, that can be implicitly casted to immutable if join is pure.<br>
</blockquote>
<br></span>
I'm talking about the general case. Jacob seems to be saying that a unique _immutable_ value is implicitly convertible to mutable.<br>
</blockquote></div><br></div><div class="gmail_extra">In general, pure function can access immutable global data, and can return its address.</div><div class="gmail_extra">Therefore, if a pure function returns immutable data, the returned pointer/reference to immutable a data should not be convertible to mutable.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Kenji Hara<br></div></div>