FREE TRIAL: Accelerate your app development career with Hacking with Swift+! >>

Why are function builders fundamental in SwiftUI?

Recorded – watch the full episode on YouTube.

In your opinion, are function builders really fundamental elements of SwiftUI?

Daniel Steinberg: Well, I think what they've said is the things that will change aren't the things that really affect SwiftUI, but we see function builders as being broader than SwiftUI. And if you look at some of the things that Doug Gregor has put there in Swift 5.3, but being able to do values inside of closures and some of the if statements inside of closures, they've added an awful lot working with generics inside of these closures that will definitely benefit function builders. And so those things will roll out. And I think they said they're about ready to put it back up on Evolution. But it seems to me we're running out of time. I think they said Swift 5.3, branches cut in April, mid April.

“I really want to see function builders, not with an underscore, but real function builders ship in iOS 14 and the next macOS. Because I want it to be fully baked.”

Paul Hudson: It is looking like Swift 5.3 is going to be early beta at Dub Dub 20, and so far as anything can be at a virtual event anymore. But the thing is with Dub Dub events, it's one of those Swift releases that has time to mature. Because they don't release in June, they release beta one in June the third or the date they actually announced and then the final version comes out September. The work that Doug is doing, and it's amazing, wonderful stuff that really helps simplify the way you write SwiftUI. I think that's likely to come in 5.3, and then actually be in their maturation stage until September the 13th or so approximately, when it finally ships.

Daniel Steinberg: And selfishly, I really want to see function builders, not with an underscore, but really function builders ship in iOS 14 and the next macOS. Because I want it to be fully baked. I don't want another year. It's unfortunate because Swift is not on the same schedule as the OS, but SwiftUI is. And so that keeps us from doing that.

I've been thinking about this combinator stuff that I think I was talking about at Spain when we were talking and function builders makes it so nice. But once you start thinking these little pieces that don't depend on the outside, it would be a nice notion – and boy, there's an app I wish someone would build that would help us visualize that.

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.

Listen on Apple Podcasts

Hacking with Swift is sponsored by Essential Developer

SPONSORED From August 2nd to 8th you can join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer!

Save your spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

BUY OUR BOOKS
Buy Pro Swift Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift (Vapor Edition) Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Server-Side Swift (Kitura Edition) Buy Beyond Code

Was this page useful? Let us know!

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.