Polymorphism without protocol dilution

Travis Griggs tgriggs at keyww.com
Wed Aug 26 04:49:33 UTC 1998

Maurice Rabb wrote:

> <snip>
> For this to work would require that I add Object>>#value which I remember
> is a no-no, because it dilutes the BlockContext protocol as Object>>#do:
> diluted the Collection protocol.  We replaced Object>>#do: with #in:, so
> with what do we replace Object>>#value?
> <snip>

Just out of curiousity and because it's late and I'm in a devil's advocate
mood... What's wrong with diluting  protocols? I have vaguely seen threads
about this, but I've never really seen (or paid attention long enough), a good
reason not to dilute protocols. It's just kind of one of those unexplained
commandments (too me). I have personally thought many times that it would be
cool to totally blur the lines between collections and single objects in
Smalltalk for quite some time. Isn't that one of the things Lisp kind of does?
Why does enumeration have to be bound to a storage strategy?

Travis Griggs
Key Technology
tgriggs at keyww.com
Smalltalk - 100% Pure Objects, Always had 'em, Always will!

More information about the Squeak-dev mailing list