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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,baa6871d466e5af9 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: AQ&S Guidance on pragma Elaborate_Body Date: 1997/04/24 Message-ID: #1/1 X-Deja-AN: 237117403 References: <528878564wnr@diphi.demon.co.uk> <5jfukp$lda@top.mitre.org> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-04-24T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >It may be true that it "is not that uncommon," but mutual dependency of >packages indicates that you have a pair of highly cohesive abstractions, >and they should really be combined into a single package. I strongly disagree. Yes, they're highly cohesive (which is why one can tolerate Elab instead of Elab_All in these cases), but that doesn't mean you should always combine them. Consider a compiler (I always use compilers as examples, since that's what I do for a living): you might want to define a bunch of types representing pieces of syntax trees, and operations on those trees. Lots and lots of things will refer to "Expression_Ptr", and there are lots of kinds of expressions, and so forth, so your suggestion would require lumping just about everything into one package. This is because everything in the language definition is highly mutually recursive (statements contain expressions, expressions contain statements (in some languages), statements contain declarations, declarations contain statements, etc). I wish Ada 95 had *better* support for mutually recursive abstractions (remember that long thread of a year or two ago?) -- I certainly don't think mutually recursive packages are inherently evil. - Bob