[swift-evolution] [pitch] Comparison Reform
scanon at apple.com
Thu Apr 27 19:46:20 CDT 2017
On Apr 27, 2017, at 7:35 PM, Jonathan Hull via swift-evolution <swift-evolution at swift.org> wrote:
> I doubt we would get rid of Double/Float, but I would love to see it used as a core type in Swift 5.
Not to be discouraging, but Swift 5 is wildly ambitious for the inclusion of unum in the stdlib core. Unums will be multiple orders of magnitude slower (and more importantly, less energy efficient) than Float or Double for the foreseeable future, due to the complete lack of hardware support. Hardware can be designed, but no one’s doing it yet, and the timeline from “functional unit is proposed” to “working hardware appears” is around 3-5 years *minimum*. For a large feature without any real precedent, tack on a couple more years. Then you have another 3-5 years before the feature is widely available on a majority of machines in the field.
For that matter, the actual definition of what “unums” are keeps changing. It wouldn’t make sense to put them in the stdlib until the definitions stabilize. Meanwhile we don’t even have bignum integers or complex numbers in the stdlib yet. There’s lots of lower-hanging fruit with a much wider audience to sort out while we wait to see what happens with unum.
If you want to explore unums, I encourage you to do so. I think it would be great for someone to throw a Swift unum library up on GitHub for people to try out. There’s just a whole lot of stuff that should happen before it becomes part of the stdlib.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution