<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I started a discussion thread that may be of interest to you, basically discussing the possibility for directional methods to reduce confusion/clarify intent, should be accessible at the following URL:</div><div class=""><a href="http://thread.gmane.org/gmane.comp.lang.swift.evolution/19185/focus=19613" class="">http://thread.gmane.org/gmane.comp.lang.swift.evolution/19185/focus=19613</a></div><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Jun 2016, at 22:05, David Waite 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="">And never mind me. Not sure how I missed that in the docs that many times.<div class=""><br class=""></div><div class="">-DW</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 24, 2016, at 1:38 PM, David Waite 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="">I noticed that the new Collection<a class="toggle-link" data-toggle="collapse" href="http://swiftdoc.org/v3.0/protocol/Collection/#comment-func-index_offsetby_" style="box-sizing: border-box; color: rgb(153, 153, 153); text-decoration: none; line-height: 18px; font-family: Menlo, Consolas, monospace; display: inline-block; margin-left: 25px; text-indent: -25px; background-position: 0px 0px;"> <span class="identifier" style="box-sizing: border-box; color: rgb(111, 65, 167);">index</span>(<wbr style="box-sizing: border-box;" class="">_:<wbr style="box-sizing: border-box;" class="">offsetBy:)</a><span style="font-size: 10px;" class=""> </span>does not define that negative offsets require a BidirectionalCollection. It also declares that negative offsets must complete in O( | offset | ) time. This differs from other methods such as<a class="toggle-link" data-toggle="collapse" href="http://swiftdoc.org/v3.0/protocol/Collection/#comment-func-distance-from_to_" style="box-sizing: border-box; color: rgb(153, 153, 153); text-decoration: none; line-height: 18px; font-family: Menlo, Consolas, monospace; display: inline-block; margin-left: 25px; text-indent: -25px; background-position: 0px 0px;"> <span class="identifier" style="box-sizing: border-box; color: rgb(111, 65, 167);">distance</span>(<wbr style="box-sizing: border-box;" class="">from:<wbr style="box-sizing: border-box;" class="">to:)</a>which indicates start <= end if not a BidirectionalCollection<div class=""><br class=""></div><div class="">This would preclude some data structures from strictly implementing the Collection protocol, such as singly-linked lists.</div><div class=""><br class=""></div><div class="">Would it be appropriate to indicate instead that BidirectionalCollection defines the negative offset behavior and negative offset performance constraint?<br class=""><div class=""><br class=""></div><div class="">-DW</div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>