When working with CoreFoundation objects (e.g. CFReadStream,
CFWriteStream) it isn't immediately obvious to me how to bridge them to
SwiftFoundation counterparts (InputStream / OutputStream).
The following works on OSX, but doesn't work on Linux;
let readStream: CFReadStream = ...
readStream as InputStream
// error: cannot convert value of type 'CFReadStream' to expected
argument type 'InputStream'
In some other places I need to bridge a String to a CFString, the
following works on OSX, but doesn't work on Linux;
let string: String = ...
string as CFString
// error: error: 'String' is not convertible to 'CFString'; did you
mean to use 'as!' to force downcast?
swift-users mailing list