[swift-evolution] [Draft] Target-specific CChar

William Dillon william at housedillon.com
Wed Mar 2 13:03:40 CST 2016


It does violate the principle of least astonishment, but we should acknowledge that the implementation-specific nature of C's char signedness is making code *less* portable, not more -- because the same code can mean different things on different platforms.  Reflecting the same in Swift makes Swift code less portable, too.

Dmitri
That is a fair point, and I agree for the most part.  However, It is my intent and expectation that the use of CChar would be limited to the margins where C APIs are imported.  Once values become a part of Swift (and used in places outside of the C interface) they should have been cast into a pure Swift type (such as UInt8, Int8, Int, etc).

- Will

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160302/ec256c7b/attachment.html>


More information about the swift-evolution mailing list