# \[Revision/Pitch\] \`Iterable\` (formerly \`BorrowingSequence\`)

**URL:** <https://forums.swift.org/t/revision-pitch-iterable-formerly-borrowingsequence/86834>\
**Category:** Pitches\
**Created:** [May 20, 2026, 4:34am UTC](https://forums.swift.org/t/revision-pitch-iterable-formerly-borrowingsequence/86834 "2026-05-20T04:34:42Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![FranzBusch](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/franzbusch/32/19447_2.png) [@FranzBusch](https://forums.swift.org/u/FranzBusch)\
**Post date:** [May 20, 2026, 11:19am UTC](https://forums.swift.org/t/revision-pitch-iterable-formerly-borrowingsequence/86834/4 "2026-05-20T11:19:32Z")

</div>

I am still very much in favor of this overall, but I have a few questions after having played with this new iteration type from `swift-collections` extensively in the past weeks and re-reading the updated proposal.

Now that we renamed `BorrowingSequence` to `Iterable`, have you thought about how the other types of iteration alluded to in the future directions section would be named?

Can we clarify the termination semantics and expectations of `IterableIteratorProtocol` in the type's docs to reflect what the proposal specifies? In particular, can we expand the proposal and docs to also clarify the semantics of what happens if the iterator throws? I expect that after an iterator throws, it **must** return empty spans. Similarly, once an iterator returned an empty span, it **must** continue returning empty spans.

The default `skip` implementation is missing a typed throws annotation in the proposal. Is this intentional or just an oversight?

Should `OutputSpan` and `OutputRawSpan` also adopt `Iterable` similar to the other adoption of the other span types?

I like the introduction of the `Failure` generic parameter. I have been prototyping new [asynchronous streaming APIs](https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncStreaming/NNNN-async-streaming.md) that we are using in the new HTTP client and server proposals. Those types, similar to `AsyncSequence`, also have the concept of a `Failure`. In addition to a `Failure`, I am currently working on the notion of a [final element](https://github.com/apple/swift-async-algorithms/pull/422). My initial thinking was that final elements could be HTTP-specific; however, it turns out many network and file protocols have the notion of a final element, such as HTTP, Quic, gRPC, TLS, gzip, and more. I don't want to derail this proposal too much, and I understand synchronous iteration is something different than asynchronous streaming. I was mostly curious if you have thought about this. A hypothetical desugared syntax could look like this:

```swift
let finalElement = for element in myIterable {
  print(element)
}
```

---

_[View the full topic](https://forums.swift.org/t/revision-pitch-iterable-formerly-borrowingsequence/86834)._
