Swift by Sundell cover image

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

Swift by Sundell

00:00

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.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app