Refinement in Smalltalk, Java and Objective-C

Smalltalk, Java and Objective-C all use the pseudo-variable super to indicate refinement. The value super can be used as a receiver, and indicates that the message should be passed to ourself, but that the binding for the method should begin in the parent class, instead of in our current class.

This example shows the equality testing method for class String in Little Smalltalk. A string is a subclass of Array. A string considred equal only to another string. If the argument is not a string, then false is returned. Otherwise, the message is then passed on to the method inherited from class Array.

[audio] [real] Text to accompany slide20, in Chapter 11 of An Introduction to Object-Oriented Programming