|< What are the most important concepts when learning Swift?||How should you approach testing in Swift? >|
Recorded – watch the full episode on YouTube.
What advice do you have for someone to try and keep up with all the changes from Swift Evolution?
Sean Allen: Well, my first disclaimer is that if you're just starting out and you're a beginner, don't even worry about this stuff, because it can be overwhelming even to experienced developers, trying to keep up with all the new changes. And even when you do keep up with them, they're still months away from being released.
So I guess I try to want to put your mind at ease as a beginner like this cutting edge Swift stuff, most likely isn't that important to you. Again as a beginner or somebody just trying to get started, so that'd be what I would say first is don't even worry about that right away.
“If you are more experienced, and you are interested, and you want to kind of get into this world, I like to do podcasts to hear about this stuff. And there's two good ones that usually focus on this type of stuff that is Swift Unwrapped by a JP Smart and Jesse Squires, and then Swift Over Coffee with Paul and Erica. They dive into the Swift Evolution process.”
However, if you are more experienced, and you are interested, and you want to kind of get into this world, I like to do podcasts to hear about this stuff. And there's two good ones that usually focus on this type of stuff that is Swift Unwrapped by a JP Smart and Jesse Squires, and then Swift Over Coffee with Paul and Erica. They dive into the Swift Evolution process.
And why I like the podcast is because yes, you go to the website, you can read the proposal. But a lot of that is very high-level programming, a lot of it goes over my head too. So what I like about the podcast is they break it down and talk about it. It just helps me understand it, when not only do you hear the proposal, but you hear the discussion around it.
And sometimes like Swift Unwrapped, they would even have members of the Swift Core Team come on the show to describe certain features, and I love that. Because I to hear the reason why kind of the conversations, what else was considered, that type of stuff.
So anyway, my first answer podcasts, as you just heard, Paul rattled off 30,000 features. I don't know how he did it, but Paul has always like living in the future, he's on probably Swift 5.6 now. So he puts out a great, "What's new?" He has a whole website dedicated to it. But you always put out a what's new in Swift 5 point whatever. So that's always a great go to if you want a quick summary.
“If you want to get in the weeds and all that stuff, you can go to the swift.org forums, but in my opinion, that's only if you're like really interested in how the language is constructed and you want to see the conversations real time.”
However, if you want to get in the weeds and all that stuff, you can go to theswift.org forums, but in my opinion, that's only if you're like really interested in how the language is constructed and you want to see the conversations real time when they're like discussing like, “Oh, we should add this feature or not have that and here's why,” if that interests you, you'll love the forums. But in my opinion, I would rather stick with what's out there and perfecting that. I don't know. I'm not really into living into the future. I'll worry about that when it gets here. But if you are, that's how I would do it.
Paul Hudson: I often ignore the forums entirely. I find them argumentative in places.
I was trying to read through the entire, very, very long series of threads about the new proposal to do multiple trailing closures. And it gets to the point where folks are quoting from the Swift Language Guide at each other, like through in the US Supreme Court argument of the constitutional rights or something like that. That's it, “well here in paragraph two, it says this, while you’re wrong because of so and so.”
It became quite funny because at one point Dave Abrams stepped in and he said, "Well, when I wrote that, what I meant was…” and it was like, “okay, boom! This guy actually wrote the thing."
Sean Allen: Dropped the hammer.
Paul Hudson: He really did. He was quite funny actually.
“I’m already looking at Swift 5.3, and wanting stuff from there because one of the proposals lets you remove
selfin places where it's unlikely to cause retain cycles and it makes SwiftUI so much nicer. And it'll make UIKit code nicer as well. But particularly SwiftUI is painful, because there are so many closures in there, but they are inside structs so they can't get into a retain cycle.”
Sean Allen: But I can only imagine, you know how argumentative people can be over simple stuff, like storyboard versus code, imagine that level of argumentative, like it's surprising anything ever gets done.
Paul Hudson: Yes, I do live in the future. It's true. And I'm already looking at Swift 5.3, and wanting stuff from there because one of the proposals lets you remove
self in places where it's unlikely to cause retain cycles and it makes SwiftUI so much nicer, so, so much nicer. And it'll make UIKit code nicer as well. But particularly SwiftUI is painful, because there's so many closures in there, but they are inside structs so they can’t get into a retain cycle. But Swift now recognizes that and lets you remove the
self everywhere. Which is really very nice – I cannot wait.
Sean Allen: So that's pretty much a SwiftUI change for the most part, like it will affect UIKIt, but do you think that the reason they're doing it is for SwitUI?
Paul Hudson: Also Combine. Combine again, has many, many closures going on. So anywhere where you rely on functions being used a lot and inland closures and so forth, it becomes annoying having to do
self – SwiftUI, Combine; it's Apple framework's still. But also Swift 5.3 has all the amazing Swift Package Manager changes. There are some massive improvements on package management 5.3. So yeah, there's lots and lots going on.
And as I answer we’ve had a couple of questions more from listeners about learning stuff. Someone here really wants a fight, asking “do you even tabs versus spaces?"
Sean Allen: Yeah, that's what I'm talking about. We programmers argue over that stuff. Imagine like serious implementation details, it's crazy.
“The architecture and stuff does matter, but not as much as it does putting out a great product.”
Paul Hudson: It really is. And it's the case that we're not here to argue about tabs and spaces. We're not even here to argue about MVC versus MVVM, and My Little Pony and whatever else with the current cool architecture, we're here to actually build and ship software to help people's lives get better. That's what we're here for, not to argue about small things.
Sean Allen: Yeah. I think it gets forgotten a lot that at the end of the day, yes, the architecture and stuff does matter, but not as much as it does putting out a great product.
Paul Hudson: Can you recommend some free resources to learn Swift for beginners? I think you can.
Sean Allen: I can, because it's not my stuff. So I'm going to recommend Paul's stuff.
Paul Hudson: Well you have a YouTube channel too, Sean.
Sean Allen: Oh yeah. I guess I was thinking about my courses. My bad. My mind is up, going to make that money. I'm just kidding. But yeah, there's my YouTube channel, it's pretty sporadic. So the reason I would recommend Paul's is because he has some structure around the free stuff. The 100 days of Swift, there's a clear-cut path, which is what a lot of beginners are actually looking for because there's so much beginner content out there that you can find. But a lot of it doesn't take you through a path.
Definitely check out my YouTube channel, check out Paul's stuff. I recommend Ray Wenderlich, they do have a free section, that's how I learned back in the day. There's a bunch of free stuff out there. That's what I'd recommend.
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.
SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!
Link copied to your pasteboard.