Roles (Re: Category Theory and Dynamic Object Document Browsi ng)

Stewart MacLean stewart.maclean at nzhis.govt.nz
Sun Feb 13 21:26:30 UTC 2000


[snip]

 	This is something I've been struggling with at work. 
> Dealing with a
> complex composite object that needs to manage different types of data
> about a given part. ...

We had this problem at the Grid. Our approach was to use roles, which we
implemented using a wrapper object and the doesNotUnderstand trick to
forward messages onto the appropriate role (after dynamically compiling a
method to directly do this, for optimisation). This got us over the
"hierarchy clash" one runs into within a single inheritance system.

Worked a treat!

Stewart





More information about the Squeak-dev mailing list