3min chapter

Swift by Sundell cover image

123: “The evolution of Swift”, with special guest Nick Lockwood

Swift by Sundell

CHAPTER

Is There a Language Specific Intelligence to Swift Property Wrappers?

Swift is touched on this with property wrappers. I'd love to see a macro system like that where effectively you can write arbitrary validation logic, but that's going to be evaluated at compile time rather than run time. Like we mentioned mirror earlier, which does exist where you can reflect over a type in a dynamic way in Swift, but it's read only. There are also limitations when it comes to property wrappers, for example, where if you want to be able to access the kind of enclosing instance that is containing the property that you're wrapping,. So that is also kind of tricky.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode