<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="">On Jan 4, 2016, at 12:58 PM, Alex Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Hi all,</div><div class=""><br class=""></div>I'm curious how other members of the Swift community feel about the clarity of the "Double" and "Float" type names. It seems incongruous that the default type for integers is "Int", but the default type for floating point numbers is not "Float”.</div></div></blockquote><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><b class="">Discussion:</b></div><div class=""><br class=""></div><div class="">I understand the origins of these names in single- and double-precision IEEE floats. But this distinction feels like a holdover from C (and a 32-bit world), rather than a natural fit for Swift.</div></div></div></div></blockquote><div><br class=""></div><div>Yes, the proper IEEE names for these would be “Single” and “Double”. &nbsp;We briefly considered and rejected that.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">Here are some reasons to <b class="">keep Double and Float as they are</b> (numbered for easy reference, but otherwise unordered):<br class=""></div><div class=""><ol class=""><li class="">"Double" and "Float" are more natural for developers who are "familiar with C-like languages."</li><li class="">A corollary: A 64-bit "Float" type could be confusing to those developers.</li></ol></div></div></div></div></blockquote><div>Yes, I think that 64-bit Float would be *actively* confusing to people, and using that name could cause real harm.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">Here are some reasons to <b class="">rename these types</b>:</div><div class=""><ol class=""><li class="">The default for a "float literal" in Swift is a 64-bit value. It would feel natural if that that value were of type "Float".</li><li class="">There are size-specific names&nbsp;for 32-bit ("Float32") and 64-bit ("Float64") floating point types. For cases where a size-specific type is needed, a size-specific name like "Float32" probably makes the intention of the code more clear (compared to just "Float").</li><li class="">Apple's Objective C APIs generally use aliased types like "CGFloat" rather than raw float or double types.</li><li class="">There is precedent for "Float" types being 64-bit in other languages like Ruby, Python and Go (as long as the hardware supports it).</li><li class="">What kind of a name for a type is "Double" anyways, amirite?<br class=""></li></ol></div></div></div></div></blockquote><div>Aside from #3 (CGFloat is a distinct type in Swift, not an alias) and #5 :-) &nbsp;I agree with these points.</div><div><br class=""></div><div>That said, personally, my feeling is that the momentum here in the broad family of C languages (including things like Java) is very strong, and that diverging from that would be extremely problematic. &nbsp;I don’t see any “active" problems with our current names. &nbsp;If this is a matter of aesthetics, or an attempt to align with Ruby/Python/Go instead of C/Java etc, then this seems like the wrong direction for Swift.</div><div><br class=""></div><div>-Chris</div><div><br class=""></div></div></body></html>