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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,81cf52699486abe7 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: GNAT listing file default names (was: Ada95 Strengths/Weaknesses) Date: 1999/09/29 Message-ID: <7srmki$2gf$1@nnrp1.deja.com>#1/1 X-Deja-AN: 530339282 References: <37EED7B8.245C0054@yukyonline.co.yuky> <7smp30$9aa1@news.cis.okstate.edu> <7sp8m9$a6e$1@nnrp1.deja.com> <1999Sep28.074901.1@eisner> <37F0B922.4F973BC0@maths.unine.ch> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Sep 29 00:31:14 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-09-29T00:00:00+00:00 List-Id: In article <37F0B922.4F973BC0@maths.unine.ch>, Gautier wrote: > > With DEC Ada, one has default/recommended source file names > > for specification and body of: > > > > MYPACKAGE_.ADA MYPACKAGE.ADA > (...) > > BTW one can put both specification and body in MYPACKAGE.ADA > (DEC Ada 3.* at least), which I almost always do under DEC. My gosh, you *almost always* put the spec and body in the same file??? that undermines one of the most important links between file structure and modular structure of your program. AQ&S specifically recommends putting one unit per file, and nearly all coding standards I am familiar with in Ada require this arrangement. > An ideal (personal view...) naming for GNAT files would be > .ads : spec. only > .adb : body only > .ada or .asb : spec. + body which is why we have not bothered to implement multiple units per file. First, it is quite tricky, because of the problem of instantiating from another unit in the current source file, but mostly it would not be used very much, because most Ada users prefer one unit per file anyway. We consider gnatchop a good enough solution for the small number of exceptions to this rule, so multiple units per file is low down on our enhancement list. Robert Dewar Ada Core Technologies By the way: in GNAT a compilation environment can contain a subunit and body with the same unit name (this is a new feature in GNAT 3.12), and that's QUITE a strange situation, where default file naming sure does not work! > > G. > Sent via Deja.com http://www.deja.com/ Before you buy.