<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 16 Mar 2017, at 14:48, Matthew Johnson wrote:</p>

<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">Thank you again for bringing these great proposals forward!</p>
</blockquote>

<p dir="auto">Thanks for reviewing it, and for your comments!</p>

<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">I only have a couple of questions about this proposal.</p>

<p dir="auto">I noticed that the types in this proposal don’t conform to Encoder and Decoder.  Is the plan to have them to provide private conforming types to Codable types they are asked to encode or decode?</p>
</blockquote>

<p dir="auto">Yes. This is because the top-level interface for encoding and decoding in JSON and plist is different from the intermediate interface that <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">Encoder</code> and <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">Decoder</code> offer. As such, the top-level types don’t conform to <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">Encoder</code> and <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">Decoder</code>, but vend out internal types which do.</p>

<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">Why are the strategy and format properties readwrite instead of configured at initialization time?  Is the intent that the encoder / decoder can be re-used with a different configuration in a subsequent call to encode or decode?</p>
</blockquote>

<p dir="auto">Yes. It’s also a mouthful to have them all as params in the constructor, especially if we add more options in the future.</p>

<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">Finally, I agree with Brent’s comments regarding errors.  I would prefer to see Foundation move away from NSError in favor of domain-specific error types.  That said, the comment that this is a broader discussion for Foundation and not something to change in this proposal is reasonable.  I hope Foundation will consider changing this in the future.</p>
</blockquote>

<p dir="auto">Thanks for your understanding — we will keep these concerns in mind.</p>

<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">Matthew</p>
</blockquote>
</div>
</div>
</body>
</html>