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

Zach Waldowski zach at waldowski.me
Mon Apr 3 18:01:18 CDT 2017


Itai and co:



This is a solid improvement.



I think it's appropriate to diminish the importance of non-keyed
containers. "Nonkeyed" as the name is pretty iffy to me, though, even
though I admit it makes the use case pretty clear. "Ordered" or
"Sequential" both sound fine, even for an encoder that's slot-based
instead of  NSArchiver-like model. An array is ordered but you don't
have to traverse it in order.


Best,

  Zachary Waldowski

  zach at waldowski.me





On Mon, Apr 3, 2017, at 04:31 PM, Itai Ferber via swift-evolution wrote:
> Hi everyone,



> With feedback from swift-evolution and additional internal review,
> we've pushed updates to this proposal, and to the Swift Encoders[1]
> proposal. In the interest of not blowing up mail clients with the full
> HTML again, I'll simply be linking to the swift-evolution PR here[2],
> as well as the specific diff[3] of what's changed.
> At a high level:


>  * The Codable protocol has been split up into Encodable and Decodable
>  * String keys on CodingKey are no longer optional
>  * KeyedEncodingContainer has become
>    KeyedEncodingContainerProtocol, with a concrete type-erased
>    KeyedEncodingContainer struct to hold it
>  * Array responsibilities have been removed from
>    KeyedEncodingContainer, and have been added to a new
>    UnkeyedEncodingContainer type
>  * codingKeyContext has been renamed codingPath
> There are some specific changes inline — I know it might be a bit of a
> pain, but let's keep discussion here on the mailing list instead of on
> GitHub. We'll be looking to start the official review process very
> soon, so we're interested in any additional feedback.
> Thanks!



> — Itai



> _________________________________________________

> swift-evolution mailing list

> swift-evolution at swift.org

> https://lists.swift.org/mailman/listinfo/swift-evolution




Links:

  1. https://github.com/apple/swift-evolution/pull/640
  2. https://github.com/apple/swift-evolution/pull/639
  3. https://github.com/apple/swift-evolution/pull/639/commits/d619eef9166f8b45ffac152d06376cbdab536241
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170403/3884d19f/attachment.html>


More information about the swift-evolution mailing list