TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Al Christians <[log in to unmask]>
Reply To:
Wed, 15 Apr 1998 10:22:51 -0700
text/plain (27 lines)
Robert I. Eachus wrote:
>>  Sometimes the violations are necessary because the formal interface
to the components of a class excludes necessary operations <<

I think that the Demeter proponents are aware of this and recognize
that the interfaces can wind up with many trivial and non-essential
functions pushed back into the supplier package to spare the client
the complications of navigating and interpreting supplied data types.

In Ada, wouldn't we want to move these non-essential functions into
child packages of the supplier package, where each child package
implements some coherent or cohesive bundle of optional features?   I
suppose it's not cheating to not count the references from the child to
the parent as a level of indirection according to the rule of Demeter
this should be an improvement of the design, because the indirection has
to be hierarchically organized.

If you count with's, then 'with  A.XYZ'  scores better than 'with A.X,
A.Y, A.Z'. But if A.X, A.Y, and A.Z define independent abstractions that
don't need to refer to each other, isn't it likely that the
program that uses three packages instead of one is (possibly much)