[Review] 0034: Adopting Span in ContiguousBytes

Hello Swift community,

The review of Adopting Span in ContiguousBytes begins now and runs through 2026-01-21.

Reviews are an important part of the Swift-Foundation evolution process. All review feedback should be either on this forum thread or, if you would like to keep your feedback private, directly to me as the review manager by DM. When contacting the review manager directly, please include proposal name in the subject line.

Trying it out

If you'd like to try this proposal out, you can check out the implementation linked in the proposal.

What goes into a review?

The goal of the review process is to improve the proposal under review
through constructive feedback. When writing your review, here are some questions you might want to answer in your review:

  • How much effort did you put into your review?
  • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

More information about Swift-Foundation review process is available at

https://github.com/swiftlang/swift-foundation/blob/main/CONTRIBUTING.md

Thank you,

Tina, Review Manager

6 Likes

It's not 2025 any more :joy:

2 Likes

This proposal looks good to me. I’m happy to see more Span adoption.

1 Like

Makes sense to adopt Span here. We should allow ~Copyable types for the generic return parameter R though to make it fully composable in all contexts.

1 Like

(someone apparently still lives in the past...)

Thanks! Updated.

This proposal looks great to me, and it would definitely come in handy in some of the cases where I’d want to adopt Span.

Franz if I’m understanding the request here, did you see the section “Allow the result of withBytes to be non-copyable” in the alternatives considered section? I believe that changing the existing protocol requirement itself is source breaking (and therefore the new withBytes requirement must match since it is implemented in terms of the existing requirement by default) but the concrete implementations on conforming types will be updated so that a ~Copyable return type is allowed in non-generic contexts when possible.

1 Like

I have missed this part of the alternatives considered. Thanks for pointing it out.

1 Like

Hello all,

The review of SF-0034 has concluded as of 2026-01-21. The discussion was light and positive, and the proposal is now accepted.

Thank you.

2 Likes