Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread Jens Alfke via swift-users
> On Jun 27, 2016, at 8:30 AM, Daniel Dunbar via swift-users > wrote: > > No, this is not possible. All of the code in a single process needs to be > compiled with the same version of Swift. How long will this be the case? The product I work on is distributed primarily

[swift-users] Appending '[element]' recursively

2016-06-27 Thread Adriano Ferreira via swift-users
Hi everyone! I’m migrating some code from Swift 2.2. to Swift 3 and something weird happened. Is this is a bug or I’m missing something? // Swift 2.2 func quickSort(_ array: [Int]) -> [Int] { guard array.count > 1 else { return array } let (pivot, rest) = (array.first!,

Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread zh ao via swift-users
Not with current Swift 3. Currently, the developing team make efforts on releasing Swift 3 together with iOS 10 and macOS 10.12 in September. The primary goal of this release is to solidify and mature the Swift language and development experience. While source breaking changes to the language

Re: [swift-users] Checking whether an object is uniquely referenced, using a weak reference to it

2016-06-27 Thread Tim Vermeulen via swift-users
Thanks for your reply. It didn’t clear up everything, though. The official documentation says "Weak references do not affect the result of this function.”, which suggests that weak (and unowned) references intentionally aren’t counted. The docs only mention the implementation of copy-on-write

[swift-users] Swift 3.0 Preview 1 Branch and Tag Updated

2016-06-27 Thread Mishal Shah via swift-users
Swift 3.0 Preview 1 branch (swift-3.0-preview-1-branch) and tag (swift-3.0-PREVIEW-1) has been updated to build with Xcode 8 beta 1. New Linux toolchains for Swift 3.0 Preview 1 are available at swift.org/download . Repositories updated:

[swift-users] Checking whether an object is uniquely referenced, using a weak reference to it

2016-06-27 Thread Tim Vermeulen via swift-users
class EmptyClass {} var strongReference = EmptyClass() weak var weakReference = strongReference print(isUniquelyReferencedNonObjC()) // true print(isUniquelyReferencedNonObjC()) // false I expected both print statements to print true. I realise that this is probably a known limitation of

Re: [swift-users] Hexadecimal floating-point literals

2016-06-27 Thread Joe Groff via swift-users
> On Jun 26, 2016, at 12:50 AM, Toni Suter via swift-users > wrote: > > Hi, > > I have a question regarding hexadecimal floating-point literals. According to > the Lexical Structure >

Re: [swift-users] Checking whether an object is uniquely referenced, using a weak reference to it

2016-06-27 Thread Jordan Rose via swift-users
Hi, Tim. The purpose of the isUniquelyReferenced checks is to see whether any changes to the properties of the object can be observed from elsewhere in this program. Therefore, I would expect it to return ‘false’ when there are weak (or unowned) references present, i.e. I think the bug is that

Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread Ted Bradley via swift-users
Thanks – I really appreciate the definitive answer. I’m worried a lot of people don’t realise this when doing their planning for the next few months – the migration guide is a little bit ambiguous on this front: “Wait until the upstream open-source project updates to Swift 2.3 or Swift 3” -

Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread Jens Alfke via swift-users
> On Jun 27, 2016, at 8:59 AM, zh ao wrote: > > Not with current Swift 3. Currently, the developing team make efforts on > releasing Swift 3 together with iOS 10 and macOS 10.12 in September. I know it’s not with Swift 3. Hopefully people on the dev team are thinking

Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread zh ao via swift-users
You need to wait until they are promised to work with 2.3 or 3.0. If you can get the source code, you can use migration tool and compile the framework yourself. Zhaoxin On Mon, Jun 27, 2016 at 6:29 PM, Ted Bradley via swift-users < swift-users@swift.org> wrote: > Ah, I wasn’t being clear :) > >

Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread Ted Bradley via swift-users
So does that mean then that Swift 2.3 and Swift 3.0 can interoperate? E.g. iOS Target ‘Foo’, imports a custom Framework ‘Bar’ Foo is Swift 3.0 Bar is Swift 2.3 From: zh ao Date: Monday, 27 June 2016 at 14:34 To: Ted Bradley Cc: "swift-users@swift.org"

[swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread Ted Bradley via swift-users
Can Swift 2.3 frameworks be used with a Swift 3.0 target app? From what I’m reading in the documentation, it seems like everything needs to be either all Swift 2.3 or all Swift 3.0 – no mix and matching. Unfortunately, the beta has been pretty unstable on my system so I’ve not managed to get

Re: [swift-users] Can Swift 2.3 frameworks be used with a Swift 3.0 app?

2016-06-27 Thread Ted Bradley via swift-users
Ah, I wasn’t being clear :) I meant user created frameworks. Such as you would get manually or via Carthage / Cocoapods. Could those be migrated to Swift 2.3, whilst your main target is migrated to Swift 3.0? As a temporary stop-gap of course. From: zh ao Date: Monday, 27