I can’t decide if this would be a good idea or not? I can see pluses and minuses!
+ Consistent. One way to remember to work with modules. Reinforces the rule that if you want to work with a module, you want to import it. - Could get confusing exactly where things are being imported, but you can stick an import away from the top of file today. I imagine might still need something like `#if module(UIKit)` for certain scenarios, but not sure. Patrick > On 13 May 2016, at 7:05 PM, Pyry Jahkola via swift-evolution > <swift-evolution@swift.org> wrote: > > 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. > }
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution