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,6161bc9aa025a9a3 X-Google-Attributes: gid103376,public From: mfeldman@seas.gwu.edu (Michael Feldman) Subject: Re: Subunits of packages vs. subunits of subprograms Date: 1996/07/13 Message-ID: <4s8h0o$s6u@felix.seas.gwu.edu>#1/1 X-Deja-AN: 168201769 references: <31E534FE.12370608@jinx.sckans.edu> organization: George Washington University newsgroups: comp.lang.ada Date: 1996-07-13T00:00:00+00:00 List-Id: In article <31E534FE.12370608@jinx.sckans.edu>, David Morton wrote: >Basically, it seems now that the separate keyword's function is to break >down a lenthy file into many small ones, mainly for easier reading, not >to speed up developement or help the concept of separate compilation. Well, that is certainly _a_ function of subunits. I think it goes too far to always be looking for _one_ purpose, to the exclusion of others. I agree that it certainly does serve the purpose you describe. I've found - as a textbook author - that it's a clever way for me to introduce a package, with full spec but with stubs for all the bodies of the operations, then bring in each operation body as a separate (pun intended) example, in a separate file. Even if GNAT requires that all the body files be available for code generation, Robert Dewar and others pointed out that these are _not_ required for syntactic and semantic checking of the package body. This can be seen as a variant of the fact that Ada does not require a package body to be present _at all_ in order to do syntax/ semantic checking - even code generation - of a client program. Many students don't focus on that either, and insist on writing a complete package body before going on to develop a client. In a team situation, in school or in industry - often the client and the package body are developed in parallel by different team members (or even different teams!). >I think I understand the reasons for it being this way, but although >it does meet the letter of the RM, it does seem to violate the spirit >of separate compilation. Oh well, it's *not* that big a deal... Well, if you buy Robert Dewar's definition of compilation as syntax/ semantic checking but no code generation, there's no violation. I've just been looking in the RM 95, especially Chapter 10, and I find no straightforward definition of compilation in it. That is, there's nothing like "compilation includes syntax/semantic checking and code generation". The details of the various phases of production of an executable program are left to the implementer: the door is evidently open to all sorts of compilation models; it's the result that counts. That's fine - it is not the role of the standard to micromanage mechanics. > >-- >David Morton > mailto:dmorton@jinx.sckans.edu http://www.sckans.edu/~dmorton/ > 205 College, Winfield, KS 67156 > This signature will self-destruct in 10 seconds... Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman - chair, SIGAda Education Working Group Professor, Dept. of Electrical Engineering and Computer Science The George Washington University - Washington, DC 20052 USA 202-994-5919 (voice) - 202-994-0227 (fax) http://www.seas.gwu.edu/faculty/mfeldman ------------------------------------------------------------------------ Pork is all that money the government gives the other guys. ------------------------------------------------------------------------ WWW: http://lglwww.epfl.ch/Ada/ or http://info.acm.org/sigada/education ------------------------------------------------------------------------