<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">if it were possible, I would only use one floating point type <div class="">in my app, however FP conversions are needed often, </div><div class="">because of heavy usage of library functions<div class="">e.g. SceneKit that all work with different floating point types..</div><div class="">Programmers should be aware of the implications of conversions</div><div class="">e.g. learn and test these in playground if not completely understood...</div><div class="">TedvG<br class=""><div><blockquote type="cite" class=""><div class="">On 19. Jun 2017, at 22:44, John McCall <<a href="mailto:rjmccall@apple.com" class="">rjmccall@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 19, 2017, at 1:58 PM, Stephen Canon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><blockquote type="cite" class="">On Jun 19, 2017, at 11:46 AM, Ted F.A. van Gaalen via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""></blockquote><div class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">var result: Float = 0.0</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">result = float * integer * uint8 + double </div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">// here, all operands should be implicitly promoted to Double before the complete expression evaluation.</div></div></blockquote></div><br class=""><div class="">You would have this produce different results than:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let temp = float * integer * uint8</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>result = temp + double</div><div class=""><br class=""></div><div class="">That would be extremely surprising to many unsuspecting users.</div><div class=""><br class=""></div><div class="">Don’t get me wrong; I *really want* implicit promotions (I proposed one scheme for them way back when Swift was first unveiled publicly).</div></div></div></blockquote><div class=""><br class=""></div></div>I don't! At least not for floating point. It is important for both reliable behavior and performance that programmers understand and minimize the conversions they do between different floating-point types.<div class=""><br class=""></div><div class="">John.</div></div></div></blockquote></div><br class=""></div></div></body></html>