<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 13, 2017, at 1:42 PM, Charles Srstka via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">The following comment accompanies the declaration of the SubSequence associated type in the Collection protocol:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// 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=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// elements.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">///</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// 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=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// 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=""><span style="font-variant-ligatures: no-common-ligatures" class="">/// 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=""><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">associatedtype</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> SubSequence : </span><span style="font-variant-ligatures: no-common-ligatures" class="">IndexableBase</span><span style="font-variant-ligatures: no-common-ligatures;" class="">, </span><span style="font-variant-ligatures: no-common-ligatures" class="">Sequence</span><span style="font-variant-ligatures: no-common-ligatures;" class=""> = </span><span style="font-variant-ligatures: no-common-ligatures" class="">Slice</span><span style="font-variant-ligatures: no-common-ligatures;" class=""><</span><span style="font-variant-ligatures: no-common-ligatures" class="">Self</span><span style="font-variant-ligatures: no-common-ligatures;" class="">></span></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;" class=""><br class=""></span></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;" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">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=""></div><div>The compiler doesn’t support “recursive” constraints. We’re working on it</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://gist.github.com/DougGregor/e7c4e7bb4465d6f5fa2b59be72dbdba6" class="">https://gist.github.com/DougGregor/e7c4e7bb4465d6f5fa2b59be72dbdba6</a></div><div><br class=""></div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""></div><br class=""></body></html>