<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div>I did think of an additional type constraint needed now due to the additional flexibility in the proposed type system.</div><div><br class=""></div><div>Today, The != operator might be defined as follows</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span> !=<T:<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Equatable</span>>(lhs:<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">T</span>, rhs:<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">T</span>) -> <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">Bool</span> {</div></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span> !(lhs<span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">==</span>rhs)</div></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">}</div></div></blockquote><div><div class=""><br class=""></div></div><div>Since the only way today for there to be a reference to something equatable is for you to have a concrete implementing type, this will get the appropriate view of Equatable (e.g. can see the ==(_:Self,_:Self)->Bool method)</div><div><br class=""></div><div>However, since the type system has expanded to now allow references to partially constrained protocols, the above is insufficient to provide access to the == operator. Example:</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(112, 61, 170);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> x:</span>Hashable<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"Foo"</span></div></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(112, 61, 170);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> y:</span>Hashable<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"Bar"</span></div></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><br class=""></div></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">x</span> != <span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">y </span><font color="#d12f1b" class="">// Not defined, since there is no ==(_:Hashable, _:Hashable)->Bool</font></div></div></blockquote><br class=""><div class="">We need a way to differentiate when we are trying to statically require a concrete type. One could reuse one of the existing keywords or an operator, but for now I’ll expand my placeholder syntax with a placeholder keyword, “<b class="">concrete</b>”</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">func</span> !=<<font color="#bb2ca2" class="">concrete</font> T:<span style="color: rgb(112, 61, 170);" class="">Equatable</span>>(lhs:<span style="color: rgb(79, 129, 135);" class="">T</span>, rhs:<span style="color: rgb(79, 129, 135);" class="">T</span>) -> <span style="color: rgb(112, 61, 170);" class="">Bool</span> {</div></div></div></blockquote><div class=""><div></div></div><div class=""><br class=""></div><div class="">or from the SequenceType version I posted yesterday:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><blockquote class="" style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(187, 44, 162);">extension</span> <span class="" style="color: rgb(79, 129, 135);">SequenceType</span> <span class="" style="color: rgb(187, 44, 162);">where</span> <span style="color: rgb(187, 44, 162);" class="">concrete</span> Element:Equatable {</div></div></blockquote></div></blockquote><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><blockquote class="" style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class=""><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"> <span class="" style="color: rgb(187, 44, 162);">func</span> elementsEqual<OtherSequence : <span class="" style="color: rgb(187, 44, 162);">protocol</span><<span class="" style="color: rgb(79, 129, 135);">SequenceType</span> <span class="" style="color: rgb(187, 44, 162);">where</span> .Element == Element>(other: OtherSequence) -> Bool</div></div><div class=""></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"> <span class="" style="color: rgb(187, 44, 162);">func</span> split(separator: <span class="" style="color: rgb(112, 61, 170);">Element</span>, maxSplit: <span class="" style="color: rgb(112, 61, 170);">Int</span>, allowEmptySlices: <span class="" style="color: rgb(112, 61, 170);">Bool</span>) -> [<span class="" style="color: rgb(187, 44, 162);">protocol</span><<span class="" style="color: rgb(112, 61, 170);">SequenceType</span> <span class="" style="color: rgb(187, 44, 162);">where</span> .Element == Element>]</div></div><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"> <span class="" style="color: rgb(187, 44, 162);">func</span> startsWith(other: <span class="" style="color: rgb(187, 44, 162);">protocol</span><<span class="" style="color: rgb(112, 61, 170);">SequenceType</span> <span class="" style="color: rgb(187, 44, 162);">where</span> .Element == Element) -> <span class="" style="color: rgb(112, 61, 170);">Bool</span></div></div><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">}</div></div></blockquote></div></blockquote><br class=""></div><div class="">(Another option for a new syntax would be to require explicit syntax for using Equatable as a existential type - i’m deferring that until there is more successful discussion on the ideas themselves.)</div><div class=""><br class=""></div><div class="">-DW</div></body></html>