Early example of Duck Typing in 1991's SELF
In 1991 Ungar and Smith wrote about the experimental programming language SELF, and in it described duck typing, callng it behaviorism
I found an early example of Duck Typing in “SELF: The Power of Simplicity” by David Ungar and Randall B. Smith. It’s from 1991. Is this the earliest example of duck typing?
Behaviorism. In many object languages, objects are passive; an object is what it is. In SELF, an object is what it does. Since variable access is the same as message passing, ordinary passive objects can be regarded merely as methods that always return themselves. For example, consider the number 17. In Smalltalk, the number 17 represents a particular (immutable) state. In SELF, the number 17 is just an object that returns itself and behaves a certain way with respect to arithmetic. The only way to know an object is by its actions.
(And is it just me, or is the programming language Io just Self with easier syntax?)