Previous Chapter Next Chapter Table of Contents Glossary Index

Chapter 14. The Objective-C Bridge

14.1. Changes in 1.2
14.2. Using Objective-C Classes
14.3. Instantiating Objective-C Objects
14.4. Calling Objective-C Methods
14.4.1. Type Coercion for Objective-C Method Calls
14.4.2. Methods which Return Structures
14.4.3. Variable-Arity Messages
14.4.4. Optimization
14.5. Defining Objective-C Classes
14.5.1. Defining classes with foreign slots
14.5.2. Defining classes with Lisp slots
14.6. Defining Objective-C Methods
14.6.1. Using define-objc-method
14.6.2. Using objc:defmethod
14.6.3. Method Redefinition Constraints
14.7. Loading Frameworks
14.8. How Objective-C Names are Mapped to Lisp Symbols

Mac OS X APIs use a language called Objective-C, which is approximately C with some object-oriented extensions modeled on Smalltalk. The Objective-C bridge makes it possible to work with Objective-C objects and classes from Lisp, and to define classes in Lisp which can be used by Objective-C.

The ultimate purpose of the Objective-C and Cocoa bridges is to make Cocoa (the standard user-interface framework on Mac OS X) as easy as possible to use from Clozure CL, in order to support the development of GUI applications and IDEs on Mac OS X (and on any platform that supports Objective-C, such as GNUStep). The eventual goal, which is much closer than it used to be, is complete integration of Cocoa into CLOS.

The current release provides Lisp-like syntax and naming conventions for the basic Objective-C operations, with automatic type processing and messages checked for validity at compile-time. It also provides some convenience facilities for working with Cocoa.

Previous Chapter Next Chapter Table of Contents Glossary Index