It is Smalltalk bolted onto C. Instead of garbage collection one uses reference counting.
While it does have exceptions, they don't unwind the stack as do C++ exceptions. They are commonly used only for fatal errors; I use C++ exceptions for all kinds of things that aren't really errors.
In C++, one calls a member function by dereferencing a pointer to that function from a table of such pointers.
In Objective-C, one calls a "method" by "sending it a message". That message is a small snippet of text. To dispatch to the actual function that implements the method, the Objective-C runtime (libobjc.dylib on OS X and iOS) must match the name of the method that one has targeted, to the name of the method whose implementation is actually just a regular C function.
Of course that would be very slow, but the Mach-O executable format is optimized for this case. Linux ELF and Windows COFF are not. So while in principle one can use Objective-C on Linux and Windows, the same code will run slower than on an equivalent Mac OS X box or iDevice.
Your code can send messages to methods that are not defined at compile time. If you actually call them you will terminate, but you can provide the implementation later.
I think Java can do that as well, but C and C++ do not have first-class language support for such a thing.
It's most-commonly used for Mac OS X Cocoa and iOS (iPhone, iPad and iPod Touch) Cocoa Touch GUI applications, but one can use it for GNUStep on *NIX as well as Cocotron on Windows.
While it does have exceptions, they don't unwind the stack as do C++ exceptions. They are commonly used only for fatal errors; I use C++ exceptions for all kinds of things that aren't really errors.
In C++, one calls a member function by dereferencing a pointer to that function from a table of such pointers.
In Objective-C, one calls a "method" by "sending it a message". That message is a small snippet of text. To dispatch to the actual function that implements the method, the Objective-C runtime (libobjc.dylib on OS X and iOS) must match the name of the method that one has targeted, to the name of the method whose implementation is actually just a regular C function.
Of course that would be very slow, but the Mach-O executable format is optimized for this case. Linux ELF and Windows COFF are not. So while in principle one can use Objective-C on Linux and Windows, the same code will run slower than on an equivalent Mac OS X box or iDevice.
Your code can send messages to methods that are not defined at compile time. If you actually call them you will terminate, but you can provide the implementation later.
I think Java can do that as well, but C and C++ do not have first-class language support for such a thing.
It's most-commonly used for Mac OS X Cocoa and iOS (iPhone, iPad and iPod Touch) Cocoa Touch GUI applications, but one can use it for GNUStep on *NIX as well as Cocotron on Windows.