[swift-evolution] [Proposal] Foundation Swift Archival & Serialization
jgroff at apple.com
Fri Mar 17 14:07:44 CDT 2017
> On Mar 16, 2017, at 12:33 PM, Itai Ferber via swift-evolution <swift-evolution at swift.org> wrote:
> This design struck me as remarkably similar to the reflection system and its `Mirror` type, which is also a separate type describing an original instance. My question was: Did you look at the reflection system when you were building this design? Do you think there might be anything that can be usefully shared between them?
> We did, quite a bit, and spent a lot of time considering reflection and its place in our design. Ultimately, the reflection system does not currently have the features we would need, and although the Swift team has expressed desire to improve the system considerably, it’s not currently a top priority, AFAIK.
Although it isn't sufficient in its current form, I think the key paths proposal that recently went out will eventually be able to help a bit here:
If keypaths eventually had the ability to be looked up by name or index, like your coding keys are, we could potentially use them as the default coding key type instead of synthesizing a new type. That would cut down the number of compiler-known things. (I think it's reasonable for coding to do its own thing in the meantime, to be clear.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution