[swift-evolution] Proposal Idea : Library (third party) Importable Checking

Jo Albright me at jo2.co
Fri Jan 15 00:43:16 CST 2016


> Interesting idea. Unless I'm misunderstanding something, it seems to me you could kill both birds with one stone. If we add an 'importable' predicate to the '#if' language, then you can already use that to conditionalize the import:
> 
> #if importable(ThirdPartyLibrary)
> import ThirdPartyLibrary
> /* decls that depend on library */
> #endif
> 
> -Joe


I am totally on board with that idea… since you could declare a type outside of the “#if importable” scope and add an extension inside the scope.

Designer . Developer .  Nerd 
Jo Albright


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160115/611fb04a/attachment.html>


More information about the swift-evolution mailing list