In the pitch thread, I suggested the existing Result
enum, so that we can use:
Result<T, Never>
instead of separate non-throwing APIs.resume(.success(value))
instead ofresume(returning: value)
.resume(.failure(error))
instead ofresume(throwing: error)
.
Are the with*Continuation
methods misnamed? The continuation is allowed to escape the given closure, unlike other with*
methods in the standard library.