Understanding Iterable (WWDC26)

Hi everyone,

After watching the WWDC26 What's New in Swift session, I wanted to learn more about Swift's ownership system. I did some research on SE-0516 and the new Iterable protocol, and I wrote an article about it.

In this post, I tried to explain the proposal with simple examples and mental models. The article covers:

  • Why we need Iterable and why Sequence is not always enough.
  • How borrowed iteration works with Span.
  • Support for non-copyable types and compiler optimizations.

I wanted to share this to help others understand the new concept, and also to check my own understanding.

You can read the article below here

I would love to hear your thoughts, feedback, or corrections.
Thank you :slight_smile:

2 Likes

The article is a good summary of the WWDC talk, but the AI-generated image is a mess. It does basically show the core idea of emitting a reference to multiple elements, but it’s surrounded by meaningless items like the CPU icon (which is in different places in the two diagrams for some reason) and words like “efficiency”. Also, the conveyor belt on the left has arrows showing it running in both directions at once. The article would be better without it.

4 Likes

Thanks for the feedback. Glad you liked the summary.
You're right. I removed it completely. The article is looks much cleaner now. :folded_hands:

1 Like