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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a8985ede8fe3d111 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-13 19:33:25 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!yeshua.marcam.com!charnel.ecst.csuchico.edu!xmission!u.cc.utah.edu!cs.weber.edu!val From: val@cs.weber.edu (Val Kartchner) Newsgroups: comp.lang.ada Subject: Re: Is Ada the future? [was: Is C++ the future?] Date: 13 Oct 1994 22:01:25 GMT Organization: Weber State University, Ogden, Utah Message-ID: <37kanl$jfd@u.cc.utah.edu> References: <1994Oct4.090807@di.epfl.ch> NNTP-Posting-Host: cs.weber.edu Date: 1994-10-13T22:01:25+00:00 List-Id: In article <1994Oct4.090807@di.epfl.ch>, Robb Nebbe wrote: |In my opinion there are two important factors that make software |maintainable. The ability to define an abstraction and have the |compiler enforce this abstraction and the ability for the person |doing the maintenance to understand the abstraction. | |For defining and particularly enforcing an abstraction you could |make a fairly strong case that Ada is better than C++. The case |wouldn't be that you can't define and enforce an abstraction in |C++, which would be a bit naive, but that in some cases the effort |required goes far beyond what is required in Ada. Ada 83 is *very* strict about enforcing the abstraction. (i.e.: private data types are *only* accesible through the defined interface.) As a programmer who uses Ada 83 at work daily, this is both a blessing and a curse. But since I wrote the package, I can just add a necessary function to the interface. ;-) I have also been reading about Ada 9X. In the booklet "Introducing Ada 9X", Section 2.7, "Hierarchical Libraries", pp 20-23 and Section 2.8, "Private Child Units", pp. 24-26 have text and code examples which demonstrate these secion summaries (in the report's own words): The important special visibility rule is that the private part (if any) and the body of the child have visibility of the private part of their parent. The private part and body of any child can access the private part of its parent (and grandparent...). Unless there is some subtlty that I've missed in the pages of *both* text and code, all that one has to do to get access to the private datatypes is to declare a child package. (Note: this doesn't include renaming of private interfaces, but does allow the foreign child to call private interfaces and thereby effectively rename a private interface.) Would an Ada programmer /ever/ knowingly defeat the intent of the package interface and do this? No, I don't think so. Do you? :-S -- |================= #include ================/// KB7VBF/P11 =| | "AMIGA: The computer for the creative mind" (tm) Commodore /// Weber State | | "Macintosh: The computer for the rest of us"(tm) Apple \\\/// University | |=== "I think, therefore I AMiga" -- val@cs.weber.edu ====\///= Ogden UT USA =|