[self-interest] Patterns in Self [was Re: delegation (was: prototypical analysis and design) ]
Jecel Assumpcao Jr
jecel at merlintec.com
Thu Nov 30 19:45:38 UTC 2000
On Thu, 30 Nov 2000, C. Ramakrishnan wrote:
> What do you think about double dispach? That's one of the GOF
> patterns, right... i can't remember anymore. I think it is still
> relevant in Self, since Self doesn't have multi-methods.
The book only makes one mention of double dispatch - that it is used in
the visitor pattern. There is this comment (last line of page 339):
"Languages that support double- or multiple dispatch lessen the need
for the Visitor pattern."
It is very tempting to add multiple dispatch to a language (see Cecil),
but it practice it is used in so few places (math for multiple number
types and graphics devices - see canvas objects in Morphic) that it
isn't worth the complication and the reduction of "objectness" in the
language. In my opinion, of course.
More information about the Self-interest