[swift-evolution] [Proposal] Foundation Swift Archival & Serialization

Joe Groff 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:

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170313/033998.html <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170313/033998.html>

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.)

-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170317/5a71cae5/attachment.html>


More information about the swift-evolution mailing list