On Reuse

Geoff Canyon gcanyon at inspiredlogic.com
Thu Jul 1 00:27:40 UTC 1999


One really good (although a little strange by most standards) example of 
reuse is XCMDs and XFCNs in HyperCard on the Mac. Because the code that 
is reused exists on an entirely different level from the code that does 
the "reusing," a well-defined interface between the two is unavoidable. 
For example, an XFCN might take a list of values and return it sorted 
according to specified criteria. There is no ambibuity--either the XFCN 
does what you want, or it doesn't.

AppleScript OSAXen are another example. Plugins are another.

Code reuse at a low level is hard; code reuse at a high level is much 
easier. Having a way of packaging up code for reuse, to enforce a clean 
and simple interface, might spur reuse in Squeak.

just my two cents

gc

Geoff Canyon
gcanyon at inspiredlogic.com
Your child can learn to read using the classics of children's literature.
Check out C.D. Caterpillar: <http://www.inspiredlogic.com/cd/>





More information about the Squeak-dev mailing list