As mentioned earlier, NaN != NaN, demonstrating that an Equatable instance that does not always equal itself is not &quot;radical.&quot; Plainly, your proposal is unworkable.<br><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 18, 2016 at 13:48 Johannes Neubauer via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
&gt; Am 18.07.2016 um 14:01 schrieb Johannes Neubauer via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;:<br>
&gt;<br>
&gt;<br>
&gt;&gt; Am 18.07.2016 um 13:52 schrieb Johannes Neubauer via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;:<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Am 18.07.2016 um 13:05 schrieb L. Mihalkovic &lt;<a href="mailto:laurent.mihalkovic@gmail.com" target="_blank">laurent.mihalkovic@gmail.com</a>&gt;:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; IMHO implementing your proposal would close the door on some of the things you do when building in-memory dbs (T == U -&gt; TRUE for T not related to U), which if swift remains for small apps is not a terrible loss, but may be more of an issue for one day doing big-data with it.<br>
&gt;&gt;<br>
&gt;&gt; You talk about reference types now, right? I proposed a `default` keyword, which (in a pattern matching fashion) would catch all calls to T == U for which no implementation exists (so this is exactly when T != U). You could of course change for a given type hierarchy the `default` result to `true` if appropriate.<br>
&gt;<br>
&gt; This formulation can be misleading: I mean `a == b` where `a: T` and `b: U` and `T != U`. Due to dynamic dispatch even: `a.dynamicType == T &amp;&amp; b.dynamicType == U &amp;&amp; T != U`.<br>
<br>
But I think, for such a radical different semantic than the normal interpretation of equality I think I wouldn’t use the `Equatable`-protocol at all, but implement a custom protocol with a custom operator.<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>