[swift-evolution] #available has a huge anti-pattern.

Chris Lattner clattner at apple.com
Thu Feb 4 11:25:09 CST 2016


> On Feb 4, 2016, at 12:56 AM, James Campbell via swift-evolution <swift-evolution at swift.org> wrote:
> 
> So if we treat an operating and apps as a collection of libraries (I.e modules) which can be vended to various other swift modules.
> 
> How would we handle library version querying ?

We have a vague desire (vague because it hasn’t been designed and built out) for #available to be extended to arbitrary modules.  SwiftPM is using semantic versioning for its packages, and that is exactly what we’d want to tie into an availability mechanism.  When SwiftPM is more mature, we can explore building out the language model for this.

-Chris



More information about the swift-evolution mailing list