Object-Oriented Programming Using SOM and DSOM/Writing Your Own Emitter
One of the features of SOM is that it allows you to do object-oriented design and programming without restricting you to a particular programming language. In addition, SOM allows applications to access objects, regardless of the programming languages in which they were created. This means that a C++ program can use classes developed in Smailtalk and vice-versa. These characteristics are often referred to as language neutral. It is believed that this will significantly increase reuse and promote better inter-operability between programming languages.
To be language neutral, the interface for a class must be defined separately from its implementation. In SOM, the class interface is defined using SOM IDL. The IDL is then compiled by the SOM compiler to create an implementation ifie where the class implementation is added. To make it easier for programmers to implement SOM classes, and clients to use SOM classes, the SOM compiler can also invoke specific emitters to produce language specific bindings. Bindings are a set of macros and procedures that tailor the IDL interface to a particular programming language. For example, the C bindings allows C programs to invoke methods on SOM objects in the same way they make ordinary procedure calls. The C++ bindings allow C++ programs to invoke methods on SOM objects in the same way they invoke methods on C++ objects.
Currently, C and C++ bindings are available for the IBM and Borland compilers. Vendors of other language compilers may offer their own language bindings in the future. To help implementors write their own language bindings, SOM provides an Emitter Framework. The Emitter Framework is a collection of SOM classes that allows programmers to write their own emitters.