TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

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
Subject:
From:
Al Christians <[log in to unmask]>
Reply To:
Date:
Wed, 15 Apr 1998 10:22:51 -0700
Content-Type:
text/plain
Parts/Attachments:
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)
better?

Al

ATOM RSS1 RSS2