[swift-evolution] Thoughts on clarity of Double and Float type names?

Charlie Monroe charlie at charliemonroe.net
Mon May 23 23:52:15 CDT 2016

In UIKit/Cocoa, there's CGFloat that does pretty much what you're asking (and it's pain working with it in Swift, since it's Double on 64-bit computers, while Swift defaults to Float, so you need casting all the time)... And I think the default behavior of Swift should be similar.

I wouldn't change the type names since Double still is "double precision", I'd just prefer changed default behavior...


> On May 24, 2016, at 5:39 AM, David Sweeris via swift-evolution <swift-evolution at swift.org> wrote:
>> On May 23, 2016, at 9:55 PM, Xiaodi Wu <xiaodi.wu at gmail.com <mailto:xiaodi.wu at gmail.com>> wrote:
>> On Mon, May 23, 2016 at 9:40 PM, David Sweeris <davesweeris at mac.com <mailto:davesweeris at mac.com>> wrote:
>> Have we (meaning the list in general, not you & me in particular) had this conversation before? This feels familiar...
>> It does, doesn't it? I've been reading this list for too long.
> I just checked, and we have! In this very thread! I didn’t realize it was started almost 6 months ago…
> Out of curiosity, are there plans for Swift's IntegerLiteralType & FloatingPointLiteralType when CPUs eventually support 128-bit ints & floats? Will they still evaluate to “Int64" and “Double” by default, or will they become the bigger types?
> - Dave Sweeris
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160524/b23ce5da/attachment.html>

More information about the swift-evolution mailing list