Re: [swift-evolution] Import Conditionals

2016-10-18 Thread Benjamin Spratling via swift-evolution
Howdy, There is already an accepted but not implemented proposal to determine whether a module can be imported and conditionally compile accordingly. https://github.com/apple/swift-evolution/blob/master/proposals/0075-import-test.md While the accepted change is certainly not as compact as your

Re: [swift-evolution] Import Conditionals

2016-10-17 Thread Karl via swift-evolution
I disagree. What about when you need to disambiguate? Currently you’d need to use ‘Darwin.connect(...)’ or ‘Glibc.connect(…)’. Merging them both in to one ‘Libc’ module would make that much easier. > On 18 Oct 2016, at 01:07, Sean Alling via swift-evolution > wrote:

Re: [swift-evolution] Import Conditionals

2016-10-17 Thread Sean Alling via swift-evolution
Yeah I saw that thread. I think (a) this is a better solution and (b) this is applicable for use cases other than specifically Glibc/Darwin. -Sean Sent from my iPhone > On Oct 17, 2016, at 19:01, Saagar Jha wrote: > > I believe there was a draft to merge all the "Libc"

Re: [swift-evolution] Import Conditionals

2016-10-17 Thread Saagar Jha via swift-evolution
I believe there was a draft to merge all the "Libc" modules; let me see if I can find that. On Mon, Oct 17, 2016 at 3:06 PM Sean Alling via swift-evolution < swift-evolution@swift.org> wrote: > *Description* > > In an effort to both (1) reduce boilerplate code, and (2) promote > cross-platform