<div dir="ltr">(This is a quotation from <a href="http://d.puremagic.com/issues/show_bug.cgi?id=9999#c4">http://d.puremagic.com/issues/show_bug.cgi?id=9999</a>)<div><br></div><div><div>> I do not agree with this enhancement. First off, making special cases for</div>
<div>> partial ordering takes a simple, straightforward idea and turns it into a</div><div>> potential morass of conflicting cases that we'll be stuck with forever.</div><div>> Secondly, the only issue here is whether '1' should be implicitly convertible</div>
<div>> to 'bool'.</div></div><div><br></div><div><div>Walter, I can understand your concern. But I think it would not be so big.</div><div>Because the possibility of extending basic type set is not so much in the</div>
<div>future.</div><div><br></div><div>Keeping language spec simple is necessary, but also reduce special rule for</div><div>humans is also important. This is a much rare case that is the mismatch between</div><div>simple rule and natural behavior for human. Fixing this issue would be valuable</div>
<div>for many D users.</div><div><br></div><div>Logically 'true' and  'false' are not related to any integer values. Although</div><div>it is widely known and used, considering boolean type as a kind of specialized</div>
<div>integer type is not general - it is implementation detail. At least it comes</div><div>from C language. In old ages, boolean type had not been supported properly in</div><div>many programming languages, but today, languages which not supporting it would</div>
<div>not regarded as useful. D is a modern programming language, so more proper</div><div>behavior for boolean type is necessary.</div><div><br></div><div>As one of its goal, D should aim the successor of C. Therefore, we cannot drop</div>
<div>the implicit conversion between bool and other integer types which inherited</div><div>from C.</div><div>But this problem behavior is definitely unnatural for many programmers, and</div><div>would enforce to study bad know-how for them. Loosing future users for the</div>
<div>compiler simplicity is not good decision. Of course, balance is necessary</div><div>there, but I think this is necessary complexity.</div></div><div><br></div><div style>Kenji Hara</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/4/28 kenji hara <span dir="ltr"><<a href="mailto:k.hara.pg@gmail.com" target="_blank">k.hara.pg@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div class="h5">2013/4/28 Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.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>On 4/27/2013 8:11 AM, 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">
Walter, now I changed my opinion. It seems not correct that being regarded bool<br>
type as one of the integer.<br>
How about?<br>
</blockquote>
<br></div>
Both C and C++ regard bool as an integer, and implicitly convert 1/0 to true/false.<br>
<br>
What C++ doesn't have is VRP and partial ordering of functions. (But it does have partial ordering of template functions.)<br>
</blockquote></div><br></div></div></div><div class="gmail_extra">I'm not argue that we should remove the implicit conversion from 1/0 to bool.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">

I don't have so much knowledge about C/C++ language spec, but for the issue case C++ makes "ambiguous error".</div><div class="gmail_extra">Contrary of that, D's current behavior looks to me it is going back to past.</div>
<span class="HOEnZb"><font color="#888888">
<div class="gmail_extra"><br></div><div class="gmail_extra">Kenji Hara</div></font></span></div></div>
</blockquote></div><br></div>