Re: [swift-users] Capturing difference with typealias

2016-08-19 Thread Slava Pestov via swift-users
Hi Jon, In beta 6, non-escaping is now the default, and you must use the @escaping attribute to declare a parameter as escaping. Unfortunately, there were a few bugs in how this attribute was implemented. I checked in a fix to the swift-3.0-branch today: https://github.com/apple/swift/commit/c

Re: [swift-users] Pointer conversions between different sockaddr types

2016-08-19 Thread Andrew Trick via swift-users
> On Aug 19, 2016, at 4:49 PM, Michael Ferenduros via swift-users > wrote: > > >>> On Aug 18, 2016, at 12:28 AM, Quinn The Eskimo! via swift-users >>> wrote: >>> >>> >>> On 17 Aug 2016, at 18:55, Martin R via swift-users >> swift.org> wrote: >>> - Are both solutions correct, should

[swift-users] Long compilation times

2016-08-19 Thread Diego Sánchez via swift-users
Hi all, We're suffering from very long Swift compilation times in our project. Each file takes ~1 second to compile (-Onone), (measured with xctool -jobs 1), which is hitting our development experience as we keep adding swift code (~350 .swift files) :( I've gone through all the googling already

Re: [swift-users] Capturing difference with typealias

2016-08-19 Thread Jon Shier via swift-users
Another general question I have is how the self requirement in general has changed. I’m noticing several instances where my previous @noescape closures, which of course had that attribute removed, are now requiring self when they didn’t before and aren’t marked @escaping either. So I guess my qu

Re: [swift-users] Pointer conversions between different sockaddr types

2016-08-19 Thread Michael Ferenduros via swift-users
> > On Aug 18, 2016, at 12:28 AM, Quinn The Eskimo! via swift-users > > wrote: > > > > > > On 17 Aug 2016, at 18:55, Martin R via swift-users > swift.org> wrote: > > > >> - Are both solutions correct, should one be preferred, or are both wrong? > > > > Your `withMemoryRebound` solution i

[swift-users] Capturing difference with typealias

2016-08-19 Thread Jon Shier via swift-users
Users: I’m updating more code to beta 6 and have noticed a strange difference when calling functions with closure parameters where that closure is declared with a typealias. Take this class: typealias Closure = () -> Void class Thing { var array: [String] = [] func doClosur

Re: [swift-users] Implicitly type conversion ?

2016-08-19 Thread Jordan Rose via swift-users
It's mainly to support heterogeneous dictionary literals. There's not usually a need to upcast to AnySequence regularly, since most things that take sequences should be using generics, but heterogeneity and generics don't play well together. Jordan > On Aug 19, 2016, at 9:00, Tim Vermeulen vi

Re: [swift-users] Implicitly type conversion ?

2016-08-19 Thread Jordan Rose via swift-users
It's mainly to support heterogeneous dictionary literals. There's not usually a need to upcast to AnySequence regularly, since most things that take sequences should be using generics, but heterogeneity and generics don't play well together. Jordan > On Aug 19, 2016, at 9:00, Tim Vermeulen vi

Re: [swift-users] Pointer conversions between different sockaddr types

2016-08-19 Thread Michael Gottesman via swift-users
> On Aug 19, 2016, at 1:58 PM, Andrew Trick via swift-users > wrote: > > >> On Aug 18, 2016, at 12:28 AM, Quinn The Eskimo! via swift-users >> mailto:swift-users@swift.org>> wrote: >> >> >> On 17 Aug 2016, at 18:55, Martin R via swift-users > > wrote: >> >>> -

Re: [swift-users] Pointer conversions between different sockaddr types

2016-08-19 Thread Andrew Trick via swift-users
> On Aug 18, 2016, at 12:28 AM, Quinn The Eskimo! via swift-users > wrote: > > > On 17 Aug 2016, at 18:55, Martin R via swift-users > wrote: > >> - Are both solutions correct, should one be preferred, or are both wrong? > > Your `withMemoryRebound` solution is correct. Absolutely, withMem

Re: [swift-users] Implicitly type conversion ?

2016-08-19 Thread Tim Vermeulen via swift-users
Any idea why Swift supports implicit casting to AnyHashable, but not to, say, AnySequence? > > On Aug 18, 2016, at 9:54 AM, Adel Zhang via > > swift-userswrote: > > > > Any other situation when implicit type casting works? > I don't know if there's a comprehensive list anywhere. Here are the on

Re: [swift-users] Implicitly type conversion ?

2016-08-19 Thread Brent Royal-Gordon via swift-users
> On Aug 18, 2016, at 9:54 AM, Adel Zhang via swift-users > wrote: > > Any other situation when implicit type casting works? I don't know if there's a comprehensive list anywhere. Here are the ones I can think of: 1. A subtype can be used where a supertype is expected; for instance, you can