Polymorphism without protocol dilution

Stephen Travis Pope stp at limbo.create.ucsb.edu
Wed Sep 2 15:28:00 UTC 1998


I'd like to speak for the camp of programmers who think that
protocol dilution is a good thing. Having written my own
inspectors, I'm happy that Object implements at:put:. I'm
also known for putting a value method in Object (^self)
and have even implemented value: (^self -> argument).
The Smoke music representation language (part of Siren)
"pollutes" Object with coercion methods such as sec, hz,
beat, dB, etc., and also adds about 10 testing methods
(isEvent, isTreeAccessor, isMusicMagnitude). 
Having value implemented in Object makes all sorts of 
block tricks possible, and enables the dynamic value
framework (Kernel-Values category) that I put in the
STP12 goodies. 

There is indeed a point where Object get overloaded, but
I especially feel that having every object have value
behaviors is quite useful (in the flavor of functional
languages--whi differentiate between immediate and 
computed values, or eager or lazy evaluation...).

stp

_ Stephen Travis Pope
_ Center for Research in Electronic Art Technology (CREATE)
_ Dept. of Music, Univ. of California, Santa Barbara (UCSB)
_ stp at create.ucsb.edu, http://www.create.ucsb.edu/~stp/





More information about the Squeak-dev mailing list