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

Karl razielim at gmail.com
Fri Jul 22 09:48:27 CDT 2016


> On 22 Jul 2016, at 03:32, Robert Widmann via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Jul 21, 2016, at 6:19 PM, Xiaodi Wu <xiaodi.wu at gmail.com <mailto:xiaodi.wu at gmail.com>> wrote:
>> 
>> This is nice. Is `areSame()` being proposed because static `==` is the status quo and you're trying to make the point that `==` in the future need not guarantee the same semantics?
> 
> Yep!  Equivalence and equality are strictly very different things.
> 

As I understand it:

-> what we call “Equatable” today checks for equivalence. For value types, equivalent is the same as equality (that’s why they are values - two instances with the same data are indistinguishable).
-> For reference types, we have an instance-equality operator (===) which checks for what I believe you mean by equality.

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


More information about the swift-evolution mailing list