As Lucas said, in most cases they do not need you. Mostly because in order to achieve polymorphism, the only thing you need is to implement the same message. There is no need to define a common type for them.
On the other hand, sometimes from my point of view you need interfaces. Basically, when you have a show contract, or when you have an abstract abstract superclass. This is very common when developing a framework. Take, for example, a registrar or serializer. In this case, you may need to define the required methods that the serializer must implement. Then you can create an abstract superclass with all the methods implemented this way:
LoggerIterface >> log: anObject self shouldBeImplemented LoggerIterface >> reset self shouldBeImplemented
Etc ... therefore, by checking this class, you can now use the methods that should be executed by the user of this object. Note that #shouldBeImplemented is implemented in Object with something like this (in Pharo Smalltalk):
Object >> shouldBeImplemented "Announce that this message should be implemented" self error: 'This message should be implemented'
But, as you can see, this is just an agreement, it is not imposed by the language itself.
Greetings
Mariano
source share