Just a little one that came up with when thinking over the companion proposal… see inline.
> On Mar 15, 2017, at 6:43 PM, Itai Ferber via swift-evolution > <[email protected]> wrote: > Foundation-Provided Errors > > Along with providing the above encoders and decoders, we would like to > promote the use of a common set of error codes and messages across all new > encoders and decoders. A common vocabulary of expected errors allows > end-users to write code agnostic about the specific encoder/decoder > implementation they are working with, whether first-party or third-party: > > extension CocoaError.Code { > public static var coderInvalidValue: CocoaError.Code > public static var coderTypeMismatch: CocoaError.Code > public static var coderReadCorrupt: CocoaError.Code > public static var coderValueNotFound: CocoaError.Code > } I find all the reasons compelling, but I don’t with the overall choice. A common vocabulary, side table info, and localization can be achieved with a dedicated error type for coders. I understand ABI (sorta) concerns are involved here, that older Foundations will continue to return the same NSError codes. However, it's never felt appropriate to create my own error instances with NSCocoaErrorDomain, and this feels very similar to that. What are our options here? Zach Waldowski [email protected]
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
