[swift-build-dev] [swift-evolution] SE-0151: Package Manager Swift Language Compatibility Version
tali at admingilde.org
Wed Feb 8 11:22:59 CST 2017
thanks for the explanation!
Am 2017-02-08 17:55, schrieb Rick Ballard:
> I believe that the reason this was desired is because we expect that
> package authors may wish to conditionally adopt new Swift 4 language
> features without breaking their ability to build with Swift 3, using
> conditional compilation blocks, e.g.
> #if swift(>=4.0)
> // Swift 4 code goes here
> With this proposal, you can do this by specifying [3, 4], in which
> case the Swift 4 compiler will compile it as Swift 4 code, and use the
> code inside the conditional compilation block, while the Swift 3
> compiler will also be able to compile it (as Swift 3 code), skipping
> the conditional compilation block.
That makes sense.
More information about the swift-build-dev