[swift-corelibs-dev] Why is Array.init(contentsOfURL:) not available?

Ole Begemann ole at oleb.net
Mon Dec 5 10:44:42 CST 2016

> The main reason is actually that we just prefer people use
> NSPropertyListSerialization API to read or write property lists. One big
> reason: that API has the possibility of giving you an error, whereas the
> collection methods do not.

Thanks for the quick reply, Tony, that makes sense. I also hadn't 
realized the nice correspondence of PropertyListSerialization and 
JSONSerialization until a friend pointed that out to me. It makes sense 
to separate the (de-)serialization step from the actual data type.


More information about the swift-corelibs-dev mailing list