<br><br><div class="gmail_quote">On Tue, Dec 11, 2012 at 7:05 PM, Peter Alexander <span dir="ltr"><<a href="mailto:peter.alexander.au@gmail.com" target="_blank">peter.alexander.au@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div id=":vt">That's the whole point. What you are doing is dangerous, so it requires the cast.<br></div></blockquote></div><br><div><br></div><div>What I am doing is not dangerous. I am operating at byte/short level.</div>

<div>Tell me, if what I am doing is dangerous, how come doing the following is not dangerous. It is allowed by D.</div><div><br></div><div>int a, b, c;</div><div>a = b + c;</div><div><br></div><div>Also the sense of safety that you get for short and byte too is not complete. Consider:</div>

<div><br></div><div><div>void main() {</div><div>  import std.stdio;</div><div>  ushort a = ushort.max;</div><div>  ushort b = ushort.max;</div><div>  a += b;</div><div>  writeln(a);</div><div>}</div></div><div><br></div>

<div><br></div><div>Is it too much to ask for consistent behavior across the built-in types?</div><div><br></div><div>Regards</div><div>- Puneet</div><div><br></div>