<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="" applecontenteditable="true"><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 24, 2017, at 7:49 AM, Davide Mendolia &lt;<a href="mailto:davide@gokarumi.com" class="">davide@gokarumi.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">What's the status of&nbsp;Recursive protocol constraints? it's a&nbsp;feature that will help the design of a library I'm&nbsp;working on.</div></div></blockquote><div><br class=""></div>It’s a surprisingly intricate feature that’s required some major refactoring in the compiler (for the better).</div><div><br class=""></div><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">How can I help ?<br class=""></div></div></div></blockquote><div><br class=""></div><div>The review of this proposal (SE-0157) is active now, so feel free to weigh in if you haven’t already.</div><div><br class=""></div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Feb 14, 2017 at 1:32 AM Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="gmail_msg"><br class="gmail_msg"><div class="gmail_msg"><blockquote type="cite" class="gmail_msg"><div class="gmail_msg">On Feb 13, 2017, at 1:42 PM, Charles Srstka via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_866077578325317742Apple-interchange-newline gmail_msg"><div class="gmail_msg"><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">The following comment accompanies the declaration of the SubSequence associated type in the Collection protocol:</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">/// A sequence that represents a contiguous subrange of the collection's</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">/// elements.</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:#008400" class="gmail_msg">///</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">/// This associated type appears as a requirement in the `Sequence`</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">/// protocol, but it is restated here with stricter constraints. In a</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,132,0)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">/// collection, the subsequence should also conform to `Collection`.</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures;color:#ba2da2" class="gmail_msg">associatedtype</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> SubSequence : </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">IndexableBase</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">, </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">Sequence</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"> = </span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">Slice</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">&lt;</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">Self</span><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg">&gt;</span></div></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"><br class="gmail_msg"></span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(112,61,170)" class="gmail_msg"><span style="font-variant-ligatures:no-common-ligatures" class="gmail_msg"><span style="font-family:Helvetica;font-size:12px" class="gmail_msg">The comments clearly state that the subsequence should conform to Collection, however, it is not declared as such. Why is this?</span></span></div></div></div></blockquote><br class="gmail_msg"></div></div><div style="word-wrap:break-word" class="gmail_msg"><div class="gmail_msg">The compiler doesn’t support “recursive” constraints. We’re working on it</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><span class="gmail_msg m_866077578325317742Apple-tab-span" style="white-space:pre-wrap">        </span><a href="https://gist.github.com/DougGregor/e7c4e7bb4465d6f5fa2b59be72dbdba6" class="gmail_msg" target="_blank">https://gist.github.com/DougGregor/e7c4e7bb4465d6f5fa2b59be72dbdba6</a></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><span class="gmail_msg m_866077578325317742Apple-tab-span" style="white-space:pre-wrap">        </span>- Doug</div><div class="gmail_msg"><br class="gmail_msg"></div><br class="gmail_msg"></div>_______________________________________________<br class="gmail_msg">
swift-evolution mailing list<br class="gmail_msg">
<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="gmail_msg">
</blockquote></div></div></div>
</div></blockquote></div><br class=""></body></html>