Avatar
Avatar
rinsuki
SwiftのTask、operation が throws なものまで @discardableResult が付いてるのってどこかで議論されていたりしますか? きちんと処理せずそのまま捨てられることになって微妙なのではと思うのですが…。 https://developer.apple.com/documentation/swift/task/init(priority:operation:)-5k89c (edited)
This is likely well-known at this point, but I wanted to ask about the rationale for this? Specifically, if this was discussed anywhere else on the forums or documented elsewhere, because I couldn't find it when searching. func someFunction() { Task { try await someThrowingFunction() } } This code swallows the error of someThrowingFun...