Previous Chapter Next Chapter Table of Contents Glossary Index

Chapter 13. The Objective-C Bridge

13.1. Changes in 1.2
13.2. Using Objective-C Classes
13.3. Instantiating Objective-C Objects
13.4. Calling Objective-C Methods
13.4.1. Type Coercion for Objective-C Method Calls
13.4.2. Methods which Return Structures
13.4.3. Variable-Arity Messages
13.4.4. Optimization
13.5. Defining Objective-C Classes
13.5.1. Defining classes with foreign slots
13.5.2. Defining classes with Lisp slots
13.6. Defining Objective-C Methods
13.6.1. Using define-objc-method
13.6.2. Using objc:defmethod
13.6.3. Method Redefinition Constraints
13.7. Loading Frameworks
13.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