13: Objective-C and Swift

Abstract

Objective-C was designed as an alternate way to add object-oriented concepts to the C programming language. There's also a variant of the language called Objective-C++, which combines the syntax of C++ and Objective-C. This chapter starts with a review of how interface design differs between C++ and Objective-C. Then it shows how C++ and Objective-C++ code can interoperate effectively, including how to use Objective-C behind a C++ application programming interface (API) and how to use C++ behind an Objective-C API. Finally, the Objective-C language has been superseded by the Swift programming language, so the chapter also covers how to call C++ code from behind a Swift API.

Keywords

Category; Data ...

Get API Design for C++, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.