Avatar
omochimetaru 10/9/2018 2:50 AM
The review of SE-0231 — Optional Iteration begins now and runs through October 12, 2018. Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to...
2:50 AM
The review of SE-0230 — Flatten nested optionals resulting from try? begins now and runs through October 8th, 2018. Reviews are an important part of the Swift evolution process. All review feedback should be either on this forum thread or, if you would like to keep your fe...
2:50 AM
2つのSEがレビュー中
2:50 AM
// Swift 4: 'Int??' // Swift 5: 'Int?' let result = try? database?.countOfRows(matching: predicate) // Swift 4: 'String??' // Swift 5: 'String?' let myString = try? String(data: someData, encoding: .utf8) // Swift 4: '[String: Any]??' // Swift 5: '[String: Any]?' let dict = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
2:50 AM
let array: [Int]? = nil for? element in array { ... } // Equivalent to if let unwrappedArray = array { for element in unwrappedArray { ... } }
2:51 AM
try? の挙動変更と、 for? 文の追加