[swift-evolution] [Proposal] Swift 2.2: #if swift language version

Drew Crawford drew at sealedabstract.com
Mon Jan 4 15:03:26 CST 2016


The swift package manager is currently considering its own define <https://github.com/apple/swift-package-manager/pull/105#issuecomment-168754567>, so it's now the second official project that could benefit from this syntax.

David, any interest in writing this up?

> On Jan 3, 2016, at 4:48 AM, Goffredo Marocchi <panajev at gmail.com> wrote:
> 
> +1 from me as well, supporting conditional compilation when the two versions of foundation differ and may differ for the foreseeable future seems a must on this end.
> 
> Sent from my iPhone
> 
> On 3 Jan 2016, at 10:12, Drew Crawford via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
>>> If we are going to support something like this, I’d rather see it be something everyone could leverage as there are many use cases for this feature:
>>> 
>>> #if available("package-name", "1.2.*")
>>> #endif
>> 
>> Big +1.
>> 
>> I've asked specifically to get some kind of conditional compilation on corelibs-foundation <https://lists.swift.org/pipermail/swift-corelibs-dev/Week-of-Mon-20151228/000287.html> being used.  corelibs-founcation is currently incompatible with Darwin Foundation, and so it is impractical to make a single codebase build for both.
>> 
>> But building the same application against both Foundations and spotting differences is one of the important ways we're going to spot bugs.
>> 
>> So I think the code quality of Foundation ultimately hinges on getting some feature like this in the language.
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160104/9a6ea696/attachment.html>


More information about the swift-evolution mailing list