[self-interest] design patterns

Jecel Assumpcao Jr jecel at merlintec.com
Fri Jan 3 21:24:51 UTC 2003


On Thursday 02 January 2003 19:20, James McCartney wrote:
> Have there been any papers written on implementing design patterns in
> delegation/object based languages? I'm interested in how delegation
> or object based inheritance can simplify design.

You might want to search the archives of this list for "design 
patterns". There were several interesting discussions, including the 
one starting at http://groups.yahoo.com/group/self-interest/message/841
and http://groups.yahoo.com/group/self-interest/message/882

> For example these
> patterns from the Gamma, et al book seem to become non-issues in such
> a language :
> Prototype - built in to object based languages.
> Singleton - built in to object based languages.
> Chain of Responsibility - can be done easily by delegating to next
> object in chain.
> State - can be done easily with an assignable parent slot.
> Strategy - can be done easily with an assignable parent slot.
> Decorator - can be done easily with an assignable parent slot.
> Proxy - proxy can delegate to the other object.

Exactly - see my own list in message 882.

> But I am also and perhaps more interested in design idioms that
> naturally arise out of differential programming, beyond the few that
> are mentioned in the papers on the Self site.

I can't think of any new patterns enabled by Self right now, but it 
would be interesting to look into this.

Note that on the other hand there are a few patterns that are required 
by Self due to "The Power Of Simplicity". Inheritance of structure (or 
shape) is a pattern, shared behavior in traits trees is a pattern and 
so on. Which is a good thing. A language can't and shouldn't have 
everything and what is left out will have to be dealt with somehow.

-- Jecel



More information about the Self-interest mailing list