[swift-evolution] [pitch] "import" declaration, support for comma-separated modules

Rien Rien at Balancingrock.nl
Sun Oct 16 02:48:13 CDT 2016


Specifically, I don’t care much. Say -0.1 :-)

In general I am against “savings lines”.
While very short modules (< 10) do indeed profit from having fewer lines, most modules don’t.
Having a few more lines, even empty ones, can do a lot to improve code readability imo.
Probably my Ada experience showing through….

Rien.

> On 16 Oct 2016, at 02:41, Charles Constant via swift-evolution <swift-evolution at swift.org> wrote:
> 
> How would we all feel about allowing multiple modules with one import statement? 
> 
> Eg: the option to write
> 
>     import Cocoa, Foo, Bar.Baz  
> 
> in addition to just:
> 
>     import Cocoa   
>     import Foo     
>     import Bar.Baz 
> 
> When I'm writing smaller files that import a few modules, I'd  prefer to lump the imports together like this. Doesn't seem like a feature that would require much effort to implement either.
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list