Re: [swift-evolution] SE-0025: Scoped Access Level, next steps

2016-03-16 Thread Haravikk via swift-evolution
> On 16 Mar 2016, at 11:04, Ross O'Brien wrote: > > If this is the case then this would seem clunky: > @testable(private(scope)) import ModuleName Does the parameter for @testable need to match exactly? An alternative could be to take it as @testable(private:

Re: [swift-evolution] SE-0025: Scoped Access Level, next steps

2016-03-16 Thread Haravikk via swift-evolution
I like the idea of repurposing brackets after private to do this. I think though that it might be better if there were also a private(type) option to allow us to be explicit about it, even if we can still type just private to use it by default. About replacing private(set), the examples you’ve

Re: [swift-evolution] SE-0025: Scoped Access Level, next steps

2016-03-15 Thread Haravikk via swift-evolution
I think in the referenced example the new private would mean “class and extensions”, with file being the new private, which I think is confusing. My preference would be: public module (currently internal) protected (class and extensions) private protected is widely used to mean this in other

Re: [swift-evolution] [Proposal] Add Binary Search functions to SequenceType

2016-03-15 Thread Haravikk via swift-evolution
> On 15 Mar 2016, at 15:48, Lorenzo Racca wrote: > > I already knew the impossibility of applying such a predicate as “$0 == 3” > and I actually couldn’t quite figure out a solution. I thought so, and I don’t think there is a way to do it, my point was really just that

Re: [swift-evolution] [Proposal] Add Binary Search functions to SequenceType

2016-03-15 Thread Haravikk via swift-evolution
I’m not sure the documentation matches the .lowerBound() and .upperBound() behaviours accurately enough; it suggests that a bound will be found for a predicate “match”, however if my predicate is { $0 == foo } then these won’t actually work at all unless I get lucky and the middle element is a

[swift-evolution] Should all GeneratorTypes also be SequenceTypes?

2016-03-14 Thread Haravikk via swift-evolution
There are quite a lot of generator implementations that also implement SequenceType (since it’s as simple as returning self). Indeed, the AnyGenerator type conforms to SequenceType, allowing any generator to be wrapped as a sequence, though I imagine this comes with some overhead. So it got me

<    1   2   3   4   5