[swift-evolution] [pitch] Comparison Reform
nevin.brackettrozinsky at gmail.com
Sun Apr 16 11:56:31 CDT 2017
Another option is to make a new type, not sure what to call it but I’ll use
“Num” for now, that is essentially the same as Double except it does not
represent NaN. After all, why should a numeric type ever be “not a number”,
and what sort of name is “Double” anyway except as a hold-over from legacy
Then people who really need IEEE semantics can keep using Double with all
its quirks. But everyone else who just wants a floating-point value can use
Num, and if they need to represent NaN they can use an Optional<Num>.
Operations which would produce NaN on Double will simply trap when done on
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution