Although the Blue Book describes the Smalltalk compiler, it does not actually specify any of the messages that it should support. The various Smalltalk dialects are not consistent on whether to access the compiler through Compiler class methods, or to create a compiler instance and access compilation facilities through instance methods. IBM Smalltalk takes the first approach, but the choice is completely arbitrary.
A key question is how to handle compile errors. CLIM defines an object that encapsulates all of the error information that a compiler might return. A CompilerError is required to support the following accessor messages, each of which returns one of the attributes of the error object:
Compiler error handling in CLIM works as follows:
Note that CLIM does not define how the CompilerError is created, or how its attributes are set. These are assumed to be platform-specific operations. This mechanism was chosen because it provides a fairly general way to handle warnings and errors, but does not require a complex runtime infrastructure.
The compilation facilities provided in CLIM support two distinct activities: compiling and evaluating.