|
HTML |
PostScript |
Adobe PDF |
The success of Smalltalk largely derives from not only being a language but also an operating system and a development environment, extremely portable on multiple platforms. The most interesting aspect of the language is that, according to the Lisp tradition, it is almost entirely written in itself. It offers important advantages such as large portability, dynamicity, a full unified world, G.U.I., connection to databases, powerfull development tools, ... In this paper we discuss the trait which underlies all these features : Reflection. We quote one of its definitions and in the first part of this paper go through the different reflective aspects of Smalltalk. We expand four major aspects in detail : the classes/metaclasses model, semantics control through the reified compilation chain, message sending and the behavioral representation through the reification of the executive stack frame of each process. We illustrate their uses with significant applications, based on both our industrial and research experiences. In the second part of the paper, we introduce and fully develop pre-post conditions into Smalltalk semantics, dealing with extensions of the model, the compiler and the development environment.