From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4fe37c439e7925b4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-25 02:35:11 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!news.mathworks.com!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: compilation time [was Re: Magnavox consultant] Date: 23 Oct 1994 15:24:38 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <38dv7m$rrh@watnews1.watson.ibm.com> References: <386ls1$lu7@news.delphi.com> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1994-10-23T15:24:38+00:00 List-Id: In article <386ls1$lu7@news.delphi.com>, tmoran@bix.com writes: |> That raises the interesting question of how the number of with's |> scales with total program size in the real world. Presumably in a |> good modular design it's much less than linear, but how much? There |> are rules of thumb about 'a single module shouldn't be more than |> N lines' - should a single module not have more than M with's? The high priests of software engineering methodology measure this characteristic in terms of "fan-in" and "fan-out" in a module dependency graph (except that, lacking Ada's formalization of what it means for one module to depend on another, some SE methodologists speak of module "controlling" module B (i.e., calling its routines) rather than of B "depending on" A (which also encompasses data dependence). In general, high fan-out (large numbers of with'ed units) is bad and high fan-in (a unit being with'ed by many other units, and thus representing a fundamental, reusable abstraction) is good. Various books provide specific numbers, but these numbers seem highly dependent on the language and on the strategy for forming cohesive modules. In addition, the citing of specific numbers is dangerous because, even though these numbers are intended as rough guidelines, meant guide intution rather than to supplant it, specific numbers often find their way into rigid, naively enforced programming rules. -- Norman H. Cohen ncohen@watson.ibm.com