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 of resume(returning: value).
resume(.failure(error)) instead of resume(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.
2 Likes