Chris, adding the C prefix is our recommendation so it is clear at the import statement that the sources in question are using the raw C interface rather than any “Swifty” wrapper.
We hope thus that the community will provide modules that add error handling, default arguments, closures, etc. while (importantly) still maintaining the general API of the C library in question and then name them without the C prefix. Here is our documentation with further justification: https://github.com/apple/swift-package-manager/blob/master/Documentation/SystemModules.md > On Dec 8, 2015, at 12:55 PM, Chris Hanson via swift-users > <[email protected]> wrote: > > On Dec 7, 2015, at 7:40 PM, Gage Morgan via swift-users > <[email protected] <mailto:[email protected]>> wrote: >> >> 1) Map the cairo.h file to a system module named CCairo > > Since Swift can natively call C APIs, I would recommend just using “Cairo” as > the module name. > > There’s no need to distinguish a module as being related to a C API. > > -- Chris > > > _______________________________________________ > swift-users mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-users
_______________________________________________ swift-users mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-users
