[swift-evolution] #available has a huge anti-pattern.
cocoadev at charlessoft.com
Wed Feb 3 15:18:05 CST 2016
> On Feb 3, 2016, at 3:07 PM, James Campbell via swift-evolution <swift-evolution at swift.org> wrote:
> I think if we did feature detection it should ignore private methods not accessible by the code querying its accesbility. Additionally we really do need proper support across platforms.
How is that going to work, though? Most of the system APIs are in Objective-C, which has no distinction between private and public methods at runtime.
I think #available is fine as-is, especially since the compiler is able to detect if you’re using an API that’s not appropriate for the OS X version you’re specifying.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution