[swift-evolution] [Review] SE-0075: Adding a Build Configuration Import Test
Gwendal Roué
gwendal.roue at gmail.com
Fri May 13 04:21:29 CDT 2016
> Le 13 mai 2016 à 11:05, Pyry Jahkola <pyry.jahkola at iki.fi> a écrit :
>
>> Gwendal Roué wrote:
>>
>> `#if import Foo` can not deal with the fact that a single source file may have to perform the importability test several times.
>
> This would be less of a problem if conditional imports like that worked locally in all scopes of code, so you could write just
>
> func foo() {
> #if import UIKit
> // Actually use UIKit...
> #endif
> // UIKit no longer visible.
> }
>
> — Pyry
Neat idea!
Gwendal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160513/ee84c99e/attachment.html>
More information about the swift-evolution
mailing list