Recorded – watch the full episode on YouTube.
In your opinion, how could Combine be even better? What would you like to see added to it?
Daniel Steinberg: Well, it's certainly early days, for a lot of them. You hear a lot of people complaining about things that it's missing and some of its just integration. Some of it's just, “we needed a year.” It's more obvious to look at SwiftUI and see what it's missing. I think we're going to see it easier for us to write our own publishers in Combine, to write our own subscribers in Combine. I think we're going to see more integration with the APIs.
And then, as we get to understand the operators, I think we'll get more operators. What Apple has said explicitly is they want very small operators that we hooked together and that's very functional. That's the transformation that we do, is we apply a chain of maps and filters and stuff to any input.
“I think we're going to see it easier for us to write our own publishers in Combine, to write our own subscribers in Combine.”
Paul Hudson: And presumably, just like we hope for SwiftUI, UIKit and similar, I guess we all hope that Combine will continue to evolve. I know it's been under production for a number of years at Apple internally and now it's public. They're going to keep on adding to this stuff, perhaps and evolving it and make it better and bigger in the future perhaps.
Daniel Steinberg: Yeah, I don't know what your advice to people is, but people have asked me about moving to SwiftUI and moving to Combine and when it's safe. What I've said is if you have a new app, I would make it iOS 14 and beyond because I think SwiftUI is going to be filled out a little bit this year, Combine is going to be filled out a little bit this year, and I'd hate for you to be iOS 13 and above – you've switched to this whole new technology, but you can only use part of it.
“I would love for us to have a complete set of docs on whatever it is that they release this year.”
Paul Hudson: Right. So you're anticipating as well that SwiftUI and Combine will expand in two months, three months, soon?
Daniel Steinberg: I sure hope so. My biggest fear is, again, with documentation, if they still haven't documented last year's release, I would like them to be working on that. Especially since we can't be there, and we can't talk to the engineers, and we can't talk to each other, I would love for us to have a complete set of docs on whatever it is that they release this year.
Again, you may push back on this, something I think we're missing now from the doc teams is we used to have programming guides, and programming guides were actually really good. They weren't just a visual tutorial. They weren't just the first thing. They told us how to deeply use something. They were the next set of questions.
We should see a Combine programming guide, we should see a SwiftUI programming guide. I mean the book from the objc.io guys was masterful, but they're reverse engineering things. And what I learned from that book was amazing. And what I learned from your book when I was first trying to come to SwiftUI was amazing. But we should get that from Apple.
Paul Hudson: Yeah. Certainly all the evidence I've seen online is that they are working towards a new developer content platform, possibly centered around the app. I'd like to see more gamification. I'd like to see more actual hands-on use cases, I'd like to see more how do I use this, why do I use this and not that thing? But they just seem to be struggling right now. I saw this week
UICollectionViewCompositionalLayout finally got documented. And that was nine months after release. So they are trailing a little bit shall we say, because iOS 13 was so big.
“We should see a Combine programming guide, we should see a SwiftUI programming guide.”
Daniel Steinberg: And you think about that, we talk a lot about SwiftUI and Combine because those are the big items and we talk about the ML stuff and the AI stuff, but
UICollectionView was amazing last year. And the diffable collections were amazing. And we just need the docs so that we use it and exactly what you said – “why do I use this instead of this?”
This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.
SAVE 50% This Black Friday all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
Link copied to your pasteboard.