AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
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.