<br><br><div class="gmail_quote">On Thu, Oct 11, 2012 at 9:44 PM, Jacob Carlborg <span dir="ltr"><<a href="mailto:doob@me.com" target="_blank">doob@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2012-10-11 19:58, Matthieu Monrocq wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I agree with David though, the problem of uninitialized integrals is<br>
that they do not have any sentinel values (unlike pointers, by the way,<br>
for which null initialization never hurts).<br>
</blockquote>
<br>
In D these are the default values for all types:<br>
<br>
<a href="http://dlang.org/type.html" target="_blank">http://dlang.org/type.html</a><br>
<br>
D always tries to use a sentinel value if possible. Unfortunately it's not for integer types.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
/Jacob Carlborg<br></font></span></blockquote><div><br>And I find this annoying. I would have preferred that they decided that  - (2**(N-1)) be a sentinel value, since anyway it's a loosy value as you cannot get its positive counterpart... But a "default" value ? Then it's impossible to decide whether it's intentional or not that this default is returned.<br>
</div></div><br>-- Matthieu<br>