Every protocol definition induces a class protocol representing the type of the class of objects which support the protocol. The class protocol hierarchy parallels the protocol hierarchy, just as the metaclass hierarchy parallels the class hierarchy. Thus, all class protocols inherit from Object class protocol , just as all metaclasses inherit from Object class . Typed Methods and Expressions Smalltalk is extended syntactically so that all variable declarations may be annotated with a type declaration. This includes temporaries, block and method arguments, instance, class, pool and global variables.
All methods have an associated return type.
If no return type is explicitly declared then Self , the type of the receiver, is assumed. Methods may be declared to take type arguments. These are never passed in explicitly, but are inferred. A private method does not appear in the classes' protocol. Classes may include message declarations , indicating messages that must be supported but are not implemented.