<div dir="ltr">2013/11/10 Daniel Davidson <span dir="ltr"><<a href="mailto:nospam@spam.com" target="_blank">nospam@spam.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Sunday, 10 November 2013 at 06:46:47 UTC, Kenji Hara wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<a href="http://wiki.dlang.org/DIP49" target="_blank">http://wiki.dlang.org/DIP49</a><br>
<br>
Experimental compiler/druntime patches (WIP, 80% completed):<br>
<a href="https://github.com/9rnsr/dmd/tree/qual_pblit" target="_blank">https://github.com/9rnsr/dmd/<u></u>tree/qual_pblit</a><br>
<a href="https://github.com/9rnsr/druntime/tree/qual_pblit" target="_blank">https://github.com/9rnsr/<u></u>druntime/tree/qual_pblit</a><br>
<br>
Kenji Hara<br>
</blockquote>
<br></div>
Does the analysis hold up the same if the type held in the array itself has mutable aliasing?<br>
<br>
struct T { int[] i; }<br>
struct S { T[] t; }<br>
<br>
Also, does it hold up with associative arrays?<br>
<br>
struct S { string[string] aa; }<br></blockquote><div> </div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
With this design, is there no need then for struct constructors - or would this be orthogonal or in addition to those?<br></blockquote><div><br></div><div><br></div><div>Currently "constructing unique object" is already supported.</div>
<div><br></div><div><a href="http://dlang.org/class#constructors">http://dlang.org/class#constructors</a><br></div><div>> If the constructor can create unique object (e.g. if it is pure), the object can be implicitly convertible to any qualifiers.<br>
</div><div><br></div><div>Indeed, the definition could be improved by using "initializing unique expression" concept. But it is not directly related to the DIP49. So the answer is "this is orthogonal".</div>
<div><br></div><div>Kenji Hara</div></div></div></div>