<div> +1 for # 1 also.</div><div><br></div><div>Glenn </div><div><br></div><div><br><div class="gmail_quote"><div>On Sun, Jan 22, 2017 at 9:07 PM James Hillhouse 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">+1 for #1<br class="gmail_msg"><br><br class="gmail_msg"><br>Jim<br class="gmail_msg"><br><br class="gmail_msg"><br><br class="gmail_msg"><br>&gt; On Jan 22, 2017, at 5:40 PM, Chris Lattner via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt;&gt;&gt; On Jan 20, 2017, at 9:39 PM, Brent Royal-Gordon via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"><br>&gt;&gt;&gt;<br class="gmail_msg"><br>&gt;&gt;&gt; On Jan 20, 2017, at 2:45 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"><br>&gt;&gt;&gt;<br class="gmail_msg"><br>&gt;&gt;&gt; on Fri Jan 20 2017, Joe Groff &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg"><br>&gt;&gt;&gt;<br class="gmail_msg"><br>&gt;&gt;&gt;&gt; Jordan points out that the generalized slicing syntax stomps on &#39;...x&#39;<br class="gmail_msg"><br>&gt;&gt;&gt;&gt; and &#39;x...&#39;, which would be somewhat obvious candidates for variadic<br class="gmail_msg"><br>&gt;&gt;&gt;&gt; splatting if that ever becomes a thing. Now, variadics are a much more<br class="gmail_msg"><br>&gt;&gt;&gt;&gt; esoteric feature and slicing is much more important to day-to-day<br class="gmail_msg"><br>&gt;&gt;&gt;&gt; programming, so this isn&#39;t the end of the world IMO, but it is<br class="gmail_msg"><br>&gt;&gt;&gt;&gt; something we&#39;d be giving up.<br class="gmail_msg"><br>&gt;&gt;&gt;<br class="gmail_msg"><br>&gt;&gt;&gt; Good point, Jordan.<br class="gmail_msg"><br>&gt;&gt;<br class="gmail_msg"><br>&gt;&gt; In my experiments with introducing one-sided operators in Swift 3, I was not able to find a case where you actually wanted to write `c[i...]`. Everything I tried needed to use `c[i..&lt;]` instead. My conclusion was that there was no possible use for postfix `...`; after all, `c[i...]` means `c[i...c.endIndex]`, which means `c[i..&lt;c.index(after: c.endIndex)]`, which violates a precondition on `index(after:)`.<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; Right, the only sensible semantics for a one sided range with an open end point is that it goes to the end of the collection.  I see a few different potential colors to paint this bikeshed with, all of which would have the semantics “c[i..&lt;c.endIndex]”:<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; 1) Provide &quot;c[i...]&quot;:<br class="gmail_msg"><br>&gt; 2) Provide &quot;c[i..&lt;]&quot;:<br class="gmail_msg"><br>&gt; 3) Provide both &quot;c[i..&lt;]” and &quot;c[i…]&quot;:<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; Since all of these operations would have the same behavior, it comes down to subjective questions:<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; a) Do we want redundancy?  IMO, no, which is why #3 is not very desirable.<br class="gmail_msg"><br>&gt; b) Which is easier to explain to people?  As you say, &quot;i..&lt; is shorthand for i..&lt;endindex” is nice and simple, which leans towards #2.<br class="gmail_msg"><br>&gt; c) Which is subjectively nicer looking?  IMO, #1 is much nicer typographically.  The ..&lt; formulation looks like symbol soup, particularly because most folks would not put a space before ].<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; There is no obvious winner, but to me, I tend to prefer #1.  What do other folks think?<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt;&gt; If that&#39;s the case, you can reserve postfix `...` for future variadics features, while using prefix `...` for these one-sided ranges.<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; I’m personally not very worried about this, the feature doesn’t exist yet and there are lots of ways to spell it.  This is something that could and probably should deserve a more explicit/heavy syntax for clarity.<br class="gmail_msg"><br>&gt;<br class="gmail_msg"><br>&gt; -Chris<br class="gmail_msg"><br>&gt; _______________________________________________<br class="gmail_msg"><br>&gt; swift-evolution mailing list<br class="gmail_msg"><br>&gt; <a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg"><br>&gt; <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"><br>_______________________________________________<br class="gmail_msg"><br>swift-evolution mailing list<br class="gmail_msg"><br><a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a><br class="gmail_msg"><br><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"><br></blockquote></div></div>