[swift-corelibs-dev] NSCoding methods
Luke Howard
lukeh at padl.com
Mon Dec 28 07:01:27 CST 2015
> On 27 Dec 2015, at 9:31 PM, Luke Howard via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
>
> I’ve implemented but not extensively tested decodeValueOfObjCType(). Do we need to support NSConcreteValue?
I started looking at NSConcreteValue (commit 1a9fe560) and decoding it is fine (notwithstanding implementing all the special cases).
What’s the plan for instantiating concrete of NSValue though?
* Class clusters seem impossible to implement in Swift
* Factory methods are an API change
* NSValue becoming concrete seems to muck up CF bridging (also, fragile base class problem)
* I looked a little into using ManagedBuffer to size instances dynamically but it’s not much help by the time init() is called
* A lookaside table works and is straightforward to implement, but is pretty ugly
— Luke
More information about the swift-corelibs-dev
mailing list