We should consider SE-0111.<br> The label of parameter is not part of function signature anymore.<br><br>Just a quick peek, what's your first impression for<br><br> some.first(n) <br><br>Opt 1: the first element, who's value == n<br>Opt 2: the elements, who's index less than n<br><br><br><div class="gmail_quote"><div dir="ltr">Ben Rimmington via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>>于2016年7月27日 周三07:29写道:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On 26 Jul 2016, at 16:15, Dave Abrahams wrote:<br>
><br>
>>> b. they are given a recognizable domain-specific notation such as:<br>
>>><br>
>>> x.removeSubrange($+n..<)<br>
>>> x.removeSubrange(..<$-n)<br>
>><br>
>> Does $ represent the start, the end, or either one depending on which<br>
>> side of the range we're on? Because if it's the third option, I think<br>
>> these two operations are actually inverted: the first is removing<br>
>> everything *except* the `prefix(n)`, and the second is removing<br>
>> everything except the `suffix(n)`.<br>
><br>
> Wow, that was impressive! With one stroke, you have just convinced me<br>
> that we can't do this. The fact that I got it wrong, along with other<br>
> excellent feedback in this thread, kills my interest in using $ in this<br>
> way.<br>
<br>
This would also conflict with one of the following:<br>
<br>
1. Allowing `$` for the Dollar library.<br>
<br>
<<a href="https://github.com/apple/swift-evolution/pull/354" rel="noreferrer" target="_blank">https://github.com/apple/swift-evolution/pull/354</a>><br>
<br>
2. Reserving `$` for the debugger.<br>
<br>
<<a href="https://github.com/apple/swift/pull/3004" rel="noreferrer" target="_blank">https://github.com/apple/swift/pull/3004</a>><br>
<br>
(The latter "test and merge" is failing for some reason).<br>
<br>
-- Ben<br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>