Re: [swift-evolution] [Pitch] Generalized supertype constraints

2017-12-07 Thread David James via swift-evolution
+1 It would be nice to have generic supertype constraints, with syntax along the lines of `where A:B`. Not sure if this is the same as what’s being suggested. Example: struct ViewWrapper { let views:[T] func add(_ view:V) -> ViewWrapper where V:T { // V must be a subtype of T

Re: [swift-evolution] [SPM] Roadmap?

2017-10-24 Thread David James via swift-evolution
I would also +1000 Xcode integration, whoever does it. I’m tired of fighting with command-line mumbo jumbo just to setup and manage dependencies. SPM should pave the way for high-level or junior devs to easily handle their dependencies in the IDE of their choice. > On 24 Oct 2017, at 13:46,

Re: [swift-evolution] /*Let it be*/ func() -> @discardable Bool {} /*Rather Than*/ @discardableResult func() -> Bool {}

2017-10-12 Thread David James via swift-evolution
> On Oct 12, 2017, at 1:40 PM, Mike Kluev wrote: > > let me guess: you put it on a different line exactly because it is in it's > current ugly form :) True, and it was making the method signature too long. But at least I have the option to do that. If we move the

Re: [swift-evolution] /*Let it be*/ func() -> @discardable Bool {} /*Rather Than*/ @discardableResult func() -> Bool {}

2017-10-12 Thread David James via swift-evolution
IMO everyday app building would rarely need to use functions with discardable results. This is more an issue with libraries or frameworks that support a fluent interface (e.g. that return self) where an operator chain can be stopped at any point, unless it clearly doesn’t make sense, in which

Re: [swift-evolution] Type-based ‘private’ access within a file

2017-04-06 Thread David James via swift-evolution
Best summary I’ve read on this thread for days! :) > On Apr 5, 2017, at 6:54 PM, Nevin Brackett-Rozinsky via swift-evolution > wrote: > > On Wed, Apr 5, 2017 at 12:02 AM, Chris Lattner via swift-evolution >

Re: [swift-evolution] Type-based ‘private’ access within a file

2017-04-04 Thread David James via swift-evolution
-1 to the new proposal. We should avoid a hybrid “private” which is both lexically scoped *and* “something completely different”. Confusing. +1 to BJ Homer’s opinion, with the caveat that we at least provide an option (checkbox?) in the Xcode migrator to migrate “private” to “scoped” so the

Re: [swift-evolution] [Review] SE-0159: Fix Private Access Levels

2017-03-26 Thread David James via swift-evolution
• What is your evaluation of the proposal? -1 as written (see below) • Is the problem being addressed significant enough to warrant a change to Swift? Not as written • Does this proposal fit well with the feel and direction of Swift? It does in terms of apparent simplicity, but not in terms of