Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-14 Thread Haravikk via swift-evolution
Apologies if this comes through as a duplicate for some people, but I'm not sure if it went through the first time; I seem to have some trouble with ProofPoint, who apparently do not monitor their false positive reporting system. As such my mail server is still listed from eight months ago

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-13 Thread Brent Royal-Gordon via swift-evolution
> On Apr 13, 2017, at 7:29 PM, Félix Cloutier via swift-evolution > wrote: > > template > void foo(T... args) > { > return bar(args...); > } > > In this bad but simple example, bar is called with the same* parameters as > foo. Parameter unpacking uses the

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-13 Thread Félix Cloutier via swift-evolution
template void foo(T... args) { return bar(args...); } In this bad but simple example, bar is called with the same* parameters as foo. Parameter unpacking uses the postfix … operator. * To some extent. Doing the right thing adds a lot of noise. > Le 13 avr. 2017 à 11:18, David Sweeris

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-13 Thread David Sweeris via swift-evolution
> On Apr 12, 2017, at 20:31, Félix Cloutier via swift-evolution > wrote: > > I don't have a strong opinion; are we sure enough that this is what we want > the postfix operator … to be for? For instance, C++ uses it a lot with > variadic templates. I don't think

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-13 Thread Haravikk via swift-evolution
I like the principle in general, but I have some concerns about the range syntax. Firstly my concern is that allowing either end of the range to be omitted feels like a possible bug to me, so I'm not sure if we should encourage that? I'm wondering if a slightly better alternative might to be

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-12 Thread Félix Cloutier via swift-evolution
I don't have a strong opinion; are we sure enough that this is what we want the postfix operator … to be for? For instance, C++ uses it a lot with variadic templates. > Le 12 avr. 2017 à 13:21, David Hart via swift-evolution > a écrit : > > I remember being against

[swift-evolution] [pitch] One-sided Ranges

2017-04-12 Thread Robert Bennett via swift-evolution
+1, very nice proposal. I think there was some discussion about this before, glad to see it being fleshed out into a full proposal. My only nitpick is that I think feel like the syntax `sequence[i…]` is awkward because `…` implies the entirety of a range (1…5 includes 1 and 5 and everything in

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-12 Thread David Hart via swift-evolution
I remember being against this feature when it was first discussed long ago. But I’ve since appreciated how elegant it is. I also like the i… was chosen instead of i..< I guess Range would be a better name for the generic protocol to represent all ranges. But its too late for that now. Correct?

Re: [swift-evolution] [pitch] One-sided Ranges

2017-04-12 Thread Nevin Brackett-Rozinsky via swift-evolution
Strong +1, glad to see this happening! Nevin ___ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution

[swift-evolution] [pitch] One-sided Ranges

2017-04-12 Thread Ben Cohen via swift-evolution
Hi Swift community, Another proposal pitch. These operators were mentioned briefly in the String manifesto as prefixing/suffixing is very common with strings. Online copy here: