[swift-evolution] [Draft][Proposal] Formalized Ordering

Xiaodi Wu xiaodi.wu at gmail.com
Fri Jul 22 00:17:49 CDT 2016


Robert, the gist is notably vague on this point, so I'm hoping you will
clarify. Are you proposing that FloatingPoint will break with IEEE754
semantics? What will be the result of `Float.nan == Float.nan`?

(My guess at the sanest outcome is that areSame/Equivalent() and <=> will
be totally ordered but FloatingPoint types will override == and the
standard comparison operators to maintain IEEE754 semantics, yes?)


On Thu, Jul 21, 2016 at 11:02 PM Dmitri Gribenko via swift-evolution <
swift-evolution at swift.org> wrote:

> Hi,
>
> On Thu, Jul 21, 2016 at 6:11 PM, Robert Widmann via swift-evolution
> <swift-evolution at swift.org> wrote:
> > Hello Swift Community,
> >
> > Harlan Haskins, Jaden Geller, and I have been working on a proposal to
> clean
> > up the semantics of ordering relations in the standard library.
>
> Great work!
>
> As a part of your implementation, are you planning to add <=>
> overloads for tuples, like we do now for comparison operators?  (See
> stdlib/public/core/Tuple.swift.gyb.)
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> _______________________________________________
> 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/20160722/99bb7240/attachment.html>


More information about the swift-evolution mailing list