<div class="gmail_quote">On 20 October 2011 11:02, Don <span dir="ltr"><<a href="mailto:nospam@nospam.com">nospam@nospam.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 20.10.2011 09:47, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Many architectures do not support real, and therefore it should never be<br>
used implicitly by the language.<br>
<br>
Precision problems aside, I would personally insist that implicit<br>
conversation from any sized int always be to float, not double, for<br>
performance reasons (the whole point of a compiled language trying<br>
to supersede C/C++).<br>
</blockquote>
<br></div>
On almost all platforms, float and double are the same speed.<br></blockquote><div><br></div><div>This isn't true. Consider ARM, hard to say this isn't a vitally important architecture these days, and there are plenty of embedded architectures that don't support doubles at all, I would say it's a really bad idea to invent a systems programming language that excludes many architectures by its design... Atmel AVR is another important architecture.</div>
<div><br></div><div>I maintain that implicit conversion of integers of any length should always target the same precision float, and that should be a compiler flag to specify the desired precision throughout the app (possibly defaulting to double).</div>
<div>If you choose 'float' you may lose some precision obviously, but you expected that when you chose the options, and did the cast...</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Note that what we're discussing here is parameter passing of single values; if it's part of an aggregate (array or struct), the issue doesn't arise.<br>
</blockquote></div><div><br></div><div>Are we? I thought we were discussing implicit conversion of ints to floats? This may be parameter passing, but also assignment I expect?</div>