next up previous
Next: Messages and Active Up: Programming Language Support Previous: Virtuals in Beta

Messages in Smalltalk

  Message passing in Smalltalk [11] activates a method via a dynamic method lookup process. A message intented to be handled by a method in class C may in this way be intercepted by (the most specific of the) similarly named methods in subclasses of C. Thus, in Smalltalk every act of message passing has the potential to be an open point. Instead of speaking about every method in Smalltalk as virtual (in the Simula sense), we prefer to regard Smalltalk messages as open points.

An open point is bound by defining an intercepting method along the path of classes, which is searched during the Smalltalk method lookup process. The most specific of these methods is the binding of the open point, and the most general of the methods plays the role as the default of the open point. In case a binding propagates the message to super, the binding may actually be a combination of a set of methods. This combination may, of course, also involve the default binding.

Due to the incrementality and the workspace-orientation of the Smalltalk environment, Smalltalk supports a late binding of the open points. Consequently, the Smalltalk environment is pretty close to supporting true open points. It might be useful to be able to distinguish normal messages from messages that are intended to serve as open points. As mentioned in section 1 this also would draw a line between internal and external aspects. Such a distinction could be made by supporting a particular announcement or documentation facility for intendedly open messages.



Kurt Noermark
Wed Mar 6 09:44:24 MET 1996