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@create.ucsb.edu, http://www.create.ucsb.edu/~stp/
Stephen Travis Pope wrote:
I'd like to speak for the camp of programmers who think that protocol dilution is a good thing.
Amen.
-- Travis Griggs Key Technology tgriggs@keyww.com Smalltalk - 100% Pure Objects, Always had 'em, Always will!
squeak-dev@lists.squeakfoundation.org