Hello, Swift community
The second review of SE-0314:
AsyncThrowingStream begins now and runs through June 28, 2021. The first review received a lot of very useful feedback. In response, the authors have made several changes to the proposal for the second review, summarized here:
YieldResultto express the action of yielding’s impact, either something is enqueued, dropped or the continuation is already terminated
init(unfolding: @escaping () async -> Element?)to offer an initializer for unfolding to handle back-pressure based APIs.
AsyncThrowingStreamgeneric on Failure but the initializers only afford for creation
where Failure == Error
- removed the example of
DispatchSourcesignals since the other
DispatchSourcetypes might be actively harmful to use in any async context
- initialization now takes a buffering policy to both restrict the buffer size as well as configure how elements are dropped
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 the review manager. If you do email me directly, please put "SE-0314" somewhere in the subject line.
The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
- What is your evaluation of the proposal?
- Is the problem being addressed significant enough to warrant a change to Swift?
- Does this proposal fit well with the feel and direction of Swift?
- If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
- How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
More information about the Swift evolution process is available at:
Thank you for participating in improving Swift!