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 Path: utzoo!attcan!uunet!husc6!linus!mbunix!eachus From: eachus@mitre-bedford.ARPA (Robert Eachus) Newsgroups: comp.lang.ada Subject: Re: Typing Ada Summary: What about generics, tasks and subprograms? Keywords: graphical design, structures, abstraction Message-ID: <32982@linus.UUCP> Date: 26 May 88 14:14:51 GMT References: <12400764147.13.RCONN@SIMTEL20> <25135.580491166@mbunix> <1017@cresswell.quintus.UUCP> <2831@Shasta.STANFORD.EDU> Sender: news@linus.UUCP Reply-To: eachus@mbunix (Robert I. Eachus) Organization: The MITRE Corporation, Bedford, Mass. List-Id: [In Memorandum. The line eater, may he rest in peace.] In article <2831@Shasta.STANFORD.EDU> neff@Shasta.UUCP (Randall Neff) writes: (Some stuff omitted for brevity) > >In Ada, there is only a single hierarchy mechanism, the package; and only >a single abstraction, the programming language code. > To quote the Ada RM: Packages are one of the four forms of program unit of which programs can be composed. The other forms are subprograms, task units, and generic units. Chapter 7, paragraph 1. All four are heirarchy mechanisms, all four can be used to model abstractions (although each is most appropriate for a different set of abstractions). I'm sure Randall's omission of other hierarchy mechanisms was accidental, but there are many Ada programmers out there who don't seem to realize that generics and tasks can, and often should, be used to create abstact data types, so I couldn't let this just pass by. (Just in case someone decides to pick nits, Ada also has blocks which can be considered as a heirarchy mechanism. But they are in general not used in that way, and should be excluded also based on the sense of Randall's discussion.) Robert I. Eachus with STANDARD_DISCLAIMER; use STANDARD_DISCLAIMER; function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...