Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-11-30 Thread Chris Lattner via swift-evolution
> On Nov 30, 2016, at 1:13 AM, Tyler Cloutier wrote: >> I think we should formally decide that a “nice” wrapper for libc is a >> non-goal. There is too much that doesn’t make sense to wrap at this level - >> the only Swift code that should be using this is the implementation of >> higher level

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-11-30 Thread Tyler Cloutier via swift-evolution
> On Oct 5, 2016, at 10:29 PM, Chris Lattner via swift-evolution > wrote: > > On Oct 5, 2016, at 3:57 PM, Brent Royal-Gordon wrote: >>> On Sep 13, 2016, at 12:29 PM, Brian Gesiak via swift-evolution >>> wrote: >>> I hadn't thought about a unified overlay for POSIX. I think the simplified >>

[swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-10 Thread Sean Alling via swift-evolution
Hey guys and girls and everything in between, I was discussing this on Twitter. Perhaps the first step to easing this import system is to allow import conditional operators: && || would be the two of most use (mostly ||). We could perform the Darwin or Glibc import based on order of operatio

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-06 Thread Jeremy Pereira via swift-evolution
> On 6 Oct 2016, at 03:08, Greg Parker via swift-evolution > wrote: > > >> On Oct 5, 2016, at 6:38 PM, Brent Royal-Gordon via swift-evolution >> wrote: >> >> Now, as for naming: I like using the leading "C" convention ("CLibc") >> because it leaves us room for introducing an overlaid versi

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Chris Lattner via swift-evolution
On Oct 5, 2016, at 3:57 PM, Brent Royal-Gordon wrote: >> On Sep 13, 2016, at 12:29 PM, Brian Gesiak via swift-evolution >> wrote: >> I hadn't thought about a unified overlay for POSIX. I think the simplified >> import alone has benefit to warrant its own evolution proposal. Would it be >> poss

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Brent Royal-Gordon via swift-evolution
> On Oct 5, 2016, at 8:55 PM, Xiaodi Wu wrote: > > See, I'd assumed that the "unified" Darwin/Glibc would simply be what you > call Platform. And if we're going to have that overlay, what's the point of > also renaming Darwin/Glibc to CPlatform, given that it's going to be > different between

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Xiaodi Wu via swift-evolution
On Wed, Oct 5, 2016 at 10:47 PM, Brent Royal-Gordon via swift-evolution < swift-evolution@swift.org> wrote: > > On Oct 5, 2016, at 7:08 PM, Greg Parker wrote: > > > >> Now, as for naming: I like using the leading "C" convention ("CLibc") > because it leaves us room for introducing an overlaid ver

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Brent Royal-Gordon via swift-evolution
> On Oct 5, 2016, at 7:08 PM, Greg Parker wrote: > >> Now, as for naming: I like using the leading "C" convention ("CLibc") >> because it leaves us room for introducing an overlaid version of the module >> in the future without breaking source compatibility. Because of this, I >> wouldn't want

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Greg Parker via swift-evolution
> On Oct 5, 2016, at 6:38 PM, Brent Royal-Gordon via swift-evolution > wrote: > > Now, as for naming: I like using the leading "C" convention ("CLibc") because > it leaves us room for introducing an overlaid version of the module in the > future without breaking source compatibility. Because

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Brent Royal-Gordon via swift-evolution
> On Oct 5, 2016, at 4:14 PM, David Waite wrote: > > I certainly wonder what people specifically want to bring the C standard > library or POSIX libraries in for - is it compatibility with third party > libraries? Functionality missing in Foundation? I see a number of reasons: 1. Acce

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Xiaodi Wu via swift-evolution
On Wed, Oct 5, 2016 at 6:14 PM, David Waite via swift-evolution < swift-evolution@swift.org> wrote: > If we are pulling in functions/structures not defined by the C standard > library or by POSIX, I’d be reluctant to support a standard name. It would > be troublesome if someone thought that they w

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread David Waite via swift-evolution
If we are pulling in functions/structures not defined by the C standard library or by POSIX, I’d be reluctant to support a standard name. It would be troublesome if someone thought that they were cross-platform but turned out to use strfry() heavily I certainly wonder what people specifically w

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Xiaodi Wu via swift-evolution
On Wed, Oct 5, 2016 at 5:57 PM, Brent Royal-Gordon via swift-evolution < swift-evolution@swift.org> wrote: > > On Sep 13, 2016, at 12:29 PM, Brian Gesiak via swift-evolution < > swift-evolution@swift.org> wrote: > > > > I hadn't thought about a unified overlay for POSIX. I think the > simplified i

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Brent Royal-Gordon via swift-evolution
> On Sep 13, 2016, at 12:29 PM, Brian Gesiak via swift-evolution > wrote: > > I hadn't thought about a unified overlay for POSIX. I think the simplified > import alone has benefit to warrant its own evolution proposal. Would it be > possible to have a separate discussion for the POSIX overlay

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-10-05 Thread Tyler Cloutier via swift-evolution
There is also a similar intent for Zewo’s POSIX: https://github.com/Zewo/POSIX/blob/master/Sources/POSIX It would be great to have something included with Swift. > On Sep 14, 2016, at 5:59 AM, Alex Blewitt via swift-evolution > wrote: > > Vapor's Core package expresses a target called simply

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-09-14 Thread Alex Blewitt via swift-evolution
Vapor's Core package expresses a target called simply 'libc': https://github.com/vapor/core/blob/master/Sources/libc/libc.swift As a result, their Swift files simply say "import libc" https://github.com/vapor/core/blob/master/S

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-09-13 Thread Brian Gesiak via swift-evolution
Resurrecting this discussion since the question of "why does Android import Glibc?" came up on this swift-corelibs-foundation pull request: https://github.com/apple/swift-corelibs-foundation/pull/622#discussion_r77848100 I think that it is also important to ask what the real goal here is. > Founda

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-08 Thread Stuart Carnie via swift-evolution
I would like to add my vote for pushing Foundation as a cross-platform compatibility layer, rather than exposing "Libc". Naturally there is flexibility in designing the APIs to be appropriately Swifty. I would also like to see higher level concepts available via Foundation, like protocols for strea

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-07 Thread Chris Lattner via swift-evolution
> On Jul 6, 2016, at 4:35 PM, David Waite wrote: > > I see two possible approaches: > > 1. A “import Libc” imports the platform libraries, whatever they may be, on > the OS platform you are on. > > 2. The OS platform libraries are divided up, virtually if necessary, to > expose the underlyin

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-06 Thread L. Mihalkovic via swift-evolution
It looks like there are 2 views being discussed Import System : just masks the difference in platform specific names Import Libc : a true attempt at a swift specific view of credible c runtime equivalent The first one would be easy to do now and would alleviate all the mindless #if...#endif we

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-06 Thread David Waite via swift-evolution
I see two possible approaches: 1. A “import Libc” imports the platform libraries, whatever they may be, on the OS platform you are on. 2. The OS platform libraries are divided up, virtually if necessary, to expose the underlying standard interfaces without platform-specific extensions. I imagi

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-06 Thread Saleem Abdulrasool via swift-evolution
On Tuesday, July 5, 2016, Chris Lattner wrote: > > On Jul 5, 2016, at 5:28 PM, Saleem Abdulrasool > wrote: > > On Tuesday, July 5, 2016, Chris Lattner > wrote: > >> >> On Jul 5, 2016, at 2:59 PM, Brian Gesiak via swift-evolution < >> swift-evolution@swift.org> wrote: >> >> Sorry to resurrect su

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-06 Thread Saleem Abdulrasool via swift-evolution
On Tuesday, July 5, 2016, Chris Lattner wrote: > > On Jul 5, 2016, at 2:59 PM, Brian Gesiak via swift-evolution < > swift-evolution@swift.org > > wrote: > > Sorry to resurrect such an old thread! I understand getting this in Swift > 3.0 might not be realistic anymore, but this is still something

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-05 Thread Chris Lattner via swift-evolution
On Jul 5, 2016, at 5:41 PM, Saleem Abdulrasool wrote: > On Tuesday, July 5, 2016, Chris Lattner > wrote: > >> On Jul 5, 2016, at 5:28 PM, Saleem Abdulrasool > > wrote: >> >> On Tuesday, July 5, 2016, Chris Lattner > > wrote: >> >>> On Jul 5, 2016, at 2:59 PM, Brian G

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-05 Thread Chris Lattner via swift-evolution
> On Jul 5, 2016, at 5:28 PM, Saleem Abdulrasool wrote: > > On Tuesday, July 5, 2016, Chris Lattner > wrote: > >> On Jul 5, 2016, at 2:59 PM, Brian Gesiak via swift-evolution >> > > wrote: >> >> Sorry to resurrect such an old thread! I understand getting this in Sw

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-05 Thread Chris Lattner via swift-evolution
> On Jul 5, 2016, at 2:59 PM, Brian Gesiak via swift-evolution > wrote: > > Sorry to resurrect such an old thread! I understand getting this in Swift 3.0 > might not be realistic anymore, but this is still something I’d love to see > added to Swift. Could someone advise on whether it still ma

Re: [swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"

2016-07-05 Thread Brian Gesiak via swift-evolution
Sorry to resurrect such an old thread! I understand getting this in Swift 3.0 might not be realistic anymore, but this is still something I’d love to see added to Swift. Could someone advise on whether it still makes sense to spend time on this proposal? Or is this part of Swift too solidified to c