A Swift-C++ interoperability workgroup has been formed as part of the Swift project. The new workgroup is responsible for developing and designing the interoperability model between C++ and Apple-developed Swift.
A January 31 bulletin announcing the formation of the workgroup noted a “huge” amount of interest in bidirectional interoperability between the two languages.
The workgroup will provide the framework for refining the interoperability layer’s goals and design and for discussing changes to the Swift compiler to support interoperability. The initial focus will be on rapidly iterating the development of the interoperability model between the two languages.
The bulletin noted that the Swift compiler now can import and use some C++ APIs including C++ standard library types
std::vector. A “C++ interoperability manifesto” published on the Swift GitHub page describes the goals and design for bidirectional API interoperability between the two languages.
The manifesto emphasises that proposed changes must fit Swift’s goals and philosophy, and that forking the Swift language or standard library or creating a dialect without a fork were not “interesting options.” Limited changes also could be made to the C++ code, toolchain, standard library implementation, and runtime environment, the document states.