> On 13 May 2016, Erica Sadun wrote:
> 
>> As per Pyry’s feedback, you could add a version:
>> 
>> #if import Frobnication(<1.7.3) // <- Only added version constraint here.
>> extension Knob : Frobnicatable { ... }
>> #endif
> 
> I have no problem with this but would need to defer to the build and language 
> people to determine whether that's practical in today's Swift. Right now, 
> there's a major-version mention in build packages but I'm not sure whether 
> that information then propagates in a usable way. If it's possible, then yes, 
> I'd rather add it in the initial design than as a later addition and I can 
> extend Pyry's suggestion in "Future Directions".

I already gave my +1 on the original proposal and if `canImport` is indeed 
easiest to implement we should get it going now.

The `#if import Foo` blocks and conditional imports with version checks can 
easily be added at a later time without much complication or breakage, AFAICT. 
Good if you can include those in the "Future Directions" section.

> p.s. Also on my Swift Bucket list: "import as".

Splendid! I'd already forgotten about qualified imports and renaming! Those 
would be welcome additions too.

— Pyry

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

Reply via email to