Behaviorism

The philosophy of behaviorism is that objects are distinguished by how they act, not how they are implemented. Polymorphism is one example of behaviorism; looping constructs work on any object which acts like a sequence. Self's unification of variable access and function call is another.

Suppose we have two objects, A and B:
A B
x = 3 x = (z - y)
y = 4 y = 4
z = (x + y) z = 7

Both of these "hold" the numbers 3, 4, and 7, but in different ways. In Python, we have to treat these objects differently:
print 3 print 7
A.x A.z()
B.x() B.z

In Self, they look exactly the same:
print 3 print 7
A x A z
B x B z


PLE Home page
Last modified: Sun Feb 4 21:11:25 EST 1996