[swift-build-dev] POSIX, Foundation, and layering

Ankit Agarwal ankit at ankit.im
Thu May 12 11:15:41 CDT 2016

3. We introduce/rename a new `Basic` module out of `Utility`. This matches
> a convention used in Clang, Swift, and llbuild for the "base support
> module". This module will define the "convenient" APIs for system services,
> shared ADTs, etc. and will sit on top of `libc`, `POSIX`, and `Foundation`.
> We should try to limit cross-platform adaption code to this layer -- if we
> need a `Foundation` API, but it is not yet implemented in such a way that
> use of that API is *syntactically* cross-platform (e.g., it needs different
> bridging behavior) then we should provide an abstraction in `Basic` that
> hides that divergence. The goal here is that any code above `Basic` can be
> written without fear of cross-platform incompatibility (which is a serious
> burden on developer productivity).

I agree with all the points. Do you think its better to create new module
Basic off of Utility or just rename Utility to Basic? I think it might get
confusing to decide where something goes if there are two such modules.
Though if definition of Basic is to provide cross-platform I'd imagine
Utility contains things like handy extensions to stdlib types and Basic
also depends on Utility.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160512/d6c8b5d9/attachment.html>

More information about the swift-build-dev mailing list