> Le 13 mai 2016 à 11:05, Pyry Jahkola <pyry.jahk...@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


_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to