<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/12/20 Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>></span><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">
On 12/19/2013 02:58 PM, 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">
2013/12/19 Timon Gehr <<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a> <mailto:<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>>><div class="im"><br>
<br>
    Well, a constructor can be thought of as yielding a result. A const<br>
    method returning 'this' cannot return an 'immutable' object.<br>
<br>
<br></div><div class="im">
Constructor has no return value in semantic level.<br>
<br>
</div></blockquote>
<br>
Conceptually speaking, a struct constructor declaration immediately gives you a callable with the corresponding return type.<br>
<br>
struct S{ this(int x)immutable{ } }<br>
immutable(S) construct(int x){ return S(x); }<br></blockquote><div><br></div><div>It's not necessary concept.</div><div><br></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">

<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">
    I do understand your rationale. What I am saying is that the DIP<br>
    adds a wildcard meaning to 'const' that was not previously there,<br>
    and I consider this to be more of a weakness than a strength.<br>
<br>
<br></div><div class="im">
What is the weakness? As far as I can see, there is no *logical* failure.<br>
<br>
Indeed I can agree that the described concept in the DIP may be hard to<br>
understand, but it would be enough easy compared with the currently<br>
implemented thing.<br>
<br>
Kenji Hara<br>
</div></blockquote>
<br>
I think it is easy to understand. I just think that the 'const' qualifier is not descriptive.<br>
</blockquote></div><br></div><div class="gmail_extra">I think it is necessary small learning cost, to keep language semantics simple.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Kenji Hara</div></div>