New to OO concepts - re-usability

Topmind topmind at technologist.com
Sun Feb 25 15:52:26 EST 2001


>
> Some algorithms require different interfaces from others.  You can
> interchange containers as long as you keep a clear idea of which
> interfaces your algorithm(s) need and pick the right containers.  The
> most common one is iteration, and almost all containers support that.

This is a sore point with me. To me it seems silly (artificial)
to split collection handling into categories (stacks, sets, trees, etc.).
If needs change from one to another or a combo, then you are hosed
with a non-fitting interface.

IMO the features should be viewed as independent as possible 
(HAS-A, not IS-A), not as coupled to some taxonomy of collections.

That is unnecessary coupling.

Shape up!

-tmind-



More information about the Python-list mailing list