[swift-corelibs-dev] NSCoding methods

Philippe Hausler phausler at apple.com
Sat Dec 26 10:45:23 CST 2015


Totally reasonable since that is a limitation that will cause subclassers to not be able to implement that even outside of Foundation.

What would help most for unit testing what you have so far?

I have a few init?(coder:) implementations that should match the implementations on darwin; primarily I was focused on getting the plist types done first and then moving onto the other classes.


> On Dec 26, 2015, at 6:01 AM, Luke Howard <lukeh at padl.com> wrote:
> 
> Another language thing I ran into ā€“ using classForKeyedArchiver/classForCoder is impossible because declarations from extensions cannot be overridden yet.
> 
> For example Iā€™d like to do:
> 
> internal class _NSCFString : NSMutableString {
> ā€¦ 
>     override var classForCoder: AnyClass {
>         return NSMutableString.self
>     }
> }
> 
> There are a few ways I can work around it but perhaps we can put these extensions directly on NSObject for now?
> 
> ā€” Luke

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20151226/3dcae6eb/attachment.html>


More information about the swift-corelibs-dev mailing list