Re: [swift-users] Compile time exceeded. Anything wrong?

2017-06-05 Thread Geordie Jay via swift-users
I doubt it'll be "fixed" in the next release (which came out less than 24 hours ago), but I gather type checker speed optimisations and fixing crashes are ongoing goals of the compiler team. With no guarantees or expectations, you may find your code compiles in an acceptable time with Swift 4 (Xcod

Re: [swift-users] Compile time exceeded. Anything wrong?

2017-06-05 Thread Geordie J via swift-users
> Am 06.06.2017 um 09:02 schrieb Jens Persson via swift-users > : > > When compiling that from the command line, I get the following (after about 6 > seconds): > > test.swift:7:18: error: cannot assign through subscript: 'dp' is a 'let' > constant > dp[0][0] = 0 > ~~ ^ >

Re: [swift-users] Compile time exceeded. Anything wrong?

2017-06-05 Thread Greg Power via swift-users
What version of Swift are you using, and what exactly do you mean by 'Xcode cannot stop’? It seems like you might be using an older version of Swift, and have hit upon a compiler bug/performance issue that has since been fixed. This code fails to compile for me in Swift 3.1: 'let dp' should be

Re: [swift-users] Compile time exceeded. Anything wrong?

2017-06-05 Thread Jens Persson via swift-users
When compiling that from the command line, I get the following (after about 6 seconds): test.swift:7:18: error: cannot assign through subscript: 'dp' is a 'let' constant dp[0][0] = 0 ~~ ^ /.../ After fixing that (changing let dp to var dp), it will compile successfully, stil

[swift-users] Archival & Serialization: What's meant by contrasting type un/safety of existing JSON serializers?

2017-06-05 Thread Jeremy W. Sherman via swift-users
What does the Archival & Serialization SE-0166 mean by: > Some libraries, like SwiftyJSON, do this [interface between JSON and Swift] at the cost of type safety; others, like ObjectMapper and Argo below, maintain type safety by offering archival functionality for JSON types ( https://github.com/ap

[swift-users] Compile time exceeded. Anything wrong?

2017-06-05 Thread Hbucius Smith via swift-users
Hi Swift-Users, when I compiled the code, Xcode cannot stop, I do not know why. It is very strange. Can anyone help ? Here is the code. I am using Xcode 8.1 class Solution { func rob(nums: [Int]) -> Int { guard nums.count > 0 else { return 0 } let dp = Array.init(repeat