Interfaces

Ranjan Bagchi ranjan.bagchi at pobox.com
Wed Feb 4 16:58:20 UTC 1998


This is certainly a generic-smalltalk issue, but I was thinking recently
that adding an interface attribute to classes could aid software quality.

The problem that I'm thinking of addressing is that smalltalk's untyped
nature certainly aids in flexibility, but at the same time can introduce
problems with two unrelated (inheritance-wise) classes not keeping up with
the messages which need to be supported.

If the classes of these objects had interface attributes (returning a
collection of Interface objects), then the system could check what the
classes are doing against what the Interface objects specify as the
requirements for implementing the interface.  This could be as simple as
checking the methods implemented, or potentially doing more involved things
like checking correctness or performance characteristics.

Just some ideas..

    -rj





More information about the Squeak-dev mailing list