[swift-corelibs-dev] Inconsistencies between Foundation APIs
Ian Ynda-Hummel
ianynda at gmail.com
Mon Dec 21 19:39:01 CST 2015
I've been working on SR-276 <https://bugs.swift.org/browse/SR-276> and I'm
finding a fair amount of inconsistencies between corelib Foundation and OS
X Foundation. It seems to be most common with optionality of return values.
e.g., in NSURL
corelib:
public func URLByAppendingPathComponent(pathComponent: String) -> NSURL?
OS X:
public func URLByAppendingPathComponent(pathComponent: String) -> NSURL
That particular case seems to be a difference in the treatment of the
return value from CFURL
public func CFURLCreateCopyAppendingPathComponent(allocator: CFAllocator!,
_ url: CFURL!, _ pathComponent: CFString!, _ isDirectory: Bool) -> CFURL!
Which briefly looking appears to be the same between corelib and OS X.
I'm not sure what the best way forward on these things is, though, as the
corelib versions have seemed consistently improved, but presumably we still
want maintain compatibility. Anyone have ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20151222/051bbb67/attachment.html>
More information about the swift-corelibs-dev
mailing list