[swift-evolution] UInt64 indices broken

G Alexander glen_alexndr at outlook.com
Wed Mar 15 20:04:39 CDT 2017


Why does swift fails to fully implement UInt in any object, arrays, sequence, range, etc

Initializer for Range, from "http://swiftdoc.org/v3.1/type/Range/"

 For example, passing a closed range with an upper bound of Int.max triggers a runtime error, because the resulting half-open range would require an upper bound of Int.max + 1, which is not representable as an Int.

So any algorithm that needs large arrays such that,   UInt64.max > index > Int64  too bad?

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

More information about the swift-evolution mailing list