[swift-evolution] [Draft] Unify "import Darwin/Glibc" to simply "Libc"
stuart.carnie at gmail.com
Fri Jul 8 11:37:27 CDT 2016
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 streams (Readers, Writers, etc) and implementations for files, sockets,
compression, encryption, etc. Protocols oriented design will shine. I think
the Go standard library would serve as inspiration for some of the design,
such as the io package.
On Thu, Jul 7, 2016 at 3:38 PM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:
> On Jul 6, 2016, at 4:35 PM, David Waite <david at alkaline-solutions.com>
> 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 imagine that would look similar to
> I think that it is also important to ask what the real goal here is.
> Foundation is our cross platform compatibility layer, are there specific
> deficiencies in the Foundation API that cause a problem here, or is it just
> that not all of corelibs Foundation is “done” yet?
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution