Hi, I have a question about the proposed `async/await`.

Are `throws async` and `await try` allowed? I think we have three options.

1. allows only `async throws`-`try await`
2. allows both `async throws`-`try await` and `throws async`-`await try`
and does not distinguish them
3. allows both and distinguishes them like `Promise<Result<T>>` and
`Result<Promise<T>>`

Although 3 is the most expressive, I think it is too complicated. In most
cases we need only something similar to `Promise<Result<T>>`. To select 1
also makes it possible to support 3 in the future. So 1 seems a good choice
to me.

--
Yuta
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to