News for hackers. Stuff that matters.
Re:Introducing Swift by seanalltogether on Monday June 02, 2014 @03:05PM (#7835271)
He mentioned the desire to drop the "C" from objective-c, but I'm curious what this means for using c/c++ libraries now. Do they need to be wrapped by objective-c before being visible in swift?
Re:Introducing Swift by quonn on Monday June 02, 2014 @04:14PM (#7836009)
Swift uses a special "bridging header" to expose Objective-C code to Swift. This header will presumably be processed by the Swift compiler.

In the other direction, XCode will automatically generate an Objective-C header to expose your Swift code to Objective-C.

Re:Introducing Swift by outworlder on Monday June 02, 2014 @04:18PM (#7836039)
The ibooks guide references a "Using Swift with Cocoa and Objective-C" document. Is that where you got your information?
Re:Introducing Swift by FreezerburnV on Monday June 02, 2014 @03:08PM (#7835317)
It seemed like it could interoperate with C just fine based on the slide talking about all three. Also because it uses the Objective-C runtime and compiles to native, it might just see C functions as normal functions. Though what little I've looked at the free book hasn't given me any hints about that yet.
Re:Introducing Swift by sv3nss0n on Monday June 02, 2014 @05:04PM (#7836372)
"You cannot import C++ code directly into Swift. Instead, create an Objective-C or C wrapper for C++ code."
Re:Introducing Swift by Udo on Monday June 02, 2014 @03:30PM (#7835572)
I suspect that as long as it compiles to LLVM, anything goes.
Re:Introducing Swift by pjmlp on Tuesday June 03, 2014 @03:01AM (#7838498)
I hope so. Another stab on C's back.