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,e5eb8ca5dcea2827 X-Google-Attributes: gid103376,public From: "Stanley R. Allen" Subject: Re: Ada OO Mechanism Date: 1999/06/08 Message-ID: <375D52D2.FF98CE3D@hso.link.com>#1/1 X-Deja-AN: 487144924 Content-Transfer-Encoding: 7bit References: <7i05aq$rgl$1@news.orbitworld.net> <7i17gj$1u1k@news2.newsguy.com> <7icgkg$k4q$1@nnrp1.deja.com> <3749E9EC.2842436A@aasaa.ofe.org> <7id2eo$fag@drn.newsguy.com> <3749FF7D.F17CE16A@aasaa.ofe.org> <374AC676.F7AE0772@lmco.com> <7ieuja$5v9@news1.newsguy.com> <7ifd6l$bmf@sjx-ixn1.ix.netcom.com> <7ihf6i$4hv@dfw-ixnews10.ix.netcom.com> <7jhon4$6a2$1@nnrp1.deja.com> <7jit97$f1b$1@pegasus.csx.cam.ac.uk> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: NASA, Kennedy Space Center Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-06-08T00:00:00+00:00 List-Id: Markus Kuhn wrote: > > Unfortunatelly, none of the textbooks > about Ada talk enough about how these features (especially > variable-length arrays, types with discriminators, subtypes, etc.) that > are not seen much in other languages are usually implemented by > compilers. > > I hope that one day, somebody will write an Ada textbook, that does not just > state the various rules of the lannguage (which can be very difficult to > remember), but that explains features such as types with discriminators > and fucntions returning variable-length arrays based on examples how > common compilers such as GNAT implement these. Then the restrictions > of these mechanisms will become obvious and have not to be remembered > as a seemingly non-orthogonal set of rules. The implementation of some of these features may be useful to explain their use, but making the philosphy behind them more apparent may be the real need. There is, lurking under the "surface" rules of the Ada language, a more or less thoroughly worked out collection of design principles. The orthogonality of the language can only be seen by comprehending these principles. The issue that triggered this response -- the similar rules for unconstrained types and class-wide types ("indefiniteness") -- is an example of one of these hidden principles at work. When I teach the language, I always try to make such principles explicit. Subtypes, generic formal and actual matching rules, type attributes, staticness, and the relationship between elaboration and execution -- are are topics that "fall between the cracks" sometimes, but are essential to grasp in order to make the most effective use of the language. (Speaking of orthogonality, one can only speculate -- unless Mr. Taft addresses it his memoirs one day -- on the influence that the science of chemistry has had on the design of Ada 95. Perhaps even unconsciously so??... ;) -- Stanley Allen mailto:s_allen@hso.link.com