Software Dev

Results from builders 🧱

Looking back, it’s interesting to appreciate the various Swift advancements that allowed SwiftUI to be created: namely opaque return types, property wrappers, and result builders.

It reminds me of all the things invented for the Apollo moon mission.

In particular, I’ve been appreciating result builders lately. They’re a useful, general-purpose feature on their own terms. I just created a cache-key builder at work which greatly simplified some pretty ugly and bug-prone logic for createing a cache key string.

I’ve seen a couple even more interesting result builds recently too.

👉 RequestDL, which simplifies the creation of network requests

👉 TextBuilder, which streamlines the creation of complex Text values

These are just two examples I’ve seen on iOS Dev Weekly once or twice, although I’m sure there are plenty more result builders out there to play with.