[swift-evolution] Module importation at project scope

Vanderlei Martinelli vmartinelli at alecrim.com
Mon Feb 8 14:51:08 CST 2016

Hello everybody.

I sent these two messages before, but I’m afraid this was a popular
requested feature or, I hope, it was gone unnoticed.

*#import (project scope import)*

*Pre-imported modules (sort of PCH)*

In many languages, including Swift, when we are developing apps (frameworks
are other history), we have to include/import dozens of libraries
references. The proposal is to have for app projects (maybe not for
frameworks projects) a way to say to Swift compiler that we are using some
module everywhere in the project code files, so we can expect the module to
be always available without a `import` on the top of each file. I suggest
one of the two alternatives:

1) To have a special type of import, `#import`.
2) have a kind of “PCH” file where we can list all modules we want to be
globally available at project scope.


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

More information about the swift-evolution mailing list