<div dir="ltr">I've been working on <a href="https://bugs.swift.org/browse/SR-276" target="_blank">SR-276</a> 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<div><br></div><div>corelib:</div><div> <span>public</span><span> </span><span>func</span><span> URLByAppendingPathComponent(pathComponent: </span><span>String</span><span>) -> </span><span>NSURL</span><span>?</span></div><div><span><br></span></div><div><span>OS X:</span></div><div><span> </span><span>public</span><span> </span><span>func</span><span> URLByAppendingPathComponent(pathComponent: </span><span>String</span><span>) -> </span><span>NSURL</span></div><div><span><br></span></div><div>That particular case seems to be a difference in the treatment of the return value from CFURL</div><div><br></div><div> <span>public</span><span> </span><span>func</span><span> CFURLCreateCopyAppendingPathComponent(allocator: </span><span>CFAllocator</span><span>!, </span><span>_</span><span> url: </span><span>CFURL</span><span>!, </span><span>_</span><span> pathComponent: </span><span>CFString</span><span>!, </span><span>_</span><span> isDirectory: </span><span>Bool</span><span>) -> </span><span>CFURL</span><span>!</span></div><div><span><br></span></div><div><span>Which briefly looking appears to be the same between corelib and OS X.</span></div><div><span><br></span></div><div><span>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?</span></div>
</div>