Hello Rick,

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
 #endif

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.

+1 :-)

--
Martin
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to