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,b0d68c502c0ae6 X-Google-Attributes: gid103376,public From: Richard D Riehle Subject: Re: Printing Enum Variable Re: Linux World Date: 1999/03/08 Message-ID: <7c1833$2n@sjx-ixn6.ix.netcom.com>#1/1 X-Deja-AN: 452672536 References: <7bfc2n$jl9@dfw-ixnews5.ix.netcom.com> <7bhh26$r7c$1@remarQ.com> <36DCAC1F.430E2C5E@aasaa.ofe.org> <7bk4v8$kl8$1@remarQ.com> <36DDA761.7B4E8099@aasaa.ofe.org> <7bkrmm$ao1$1@nnrp1.dejanews.com> <36DE0007.5236CEA2@aasaa.ofe.org> <7bmmu2$n0h@news1.newsguy.com> <7btj81$j0d$1@remarQ.com> <1999Mar7.074102.1@eisner> <7bva62$kgm$1@remarQ.com> <7c0knr$v5$1@nnrp1.dejanews.com> Organization: Netcom X-NETCOM-Date: Mon Mar 08 11:23:15 AM PST 1999 Newsgroups: comp.lang.ada Date: 1999-03-08T11:23:15-08:00 List-Id: In article <7c0knr$v5$1@nnrp1.dejanews.com>, robert_dewar@my-dejanews.com wrote: >In fact Ada fully allows a low-level form of expression >corresponding to C... As a follow-on to Robert's comment, and for the benefit of the Mr. Young, who indicated an interest in learning more about Ada, a key idea in Ada is to make all possible expressions possible, but to start with the default level of "safe." That is, strong typing, separation of scope and visibility, and strict accessibility rules for access and tagged types, are the default in Ada. It has often been noted that one principal upon which Ada is founded is to have a language design for which one can write a compiler that catches the maximum number of errors before we ever see an executable program. One may start with a language in which the default is "safe" and relax the rules to make it less safe. For example, use clauses, unchecked operations, and other built-in features of Ada relax the safety default. It is more difficult to start with a language where the default is "unsafe" and make it more safe. This is a built-in problem for the C family of languages. That is, every language built on top of C has the problem of starting with a model in which the default is "unsafe." With C++ we can define class modules that improve the safety of a design, but the characteristics of the foundation language are still there. The C foundation makes it all too easy to revert back to unsafe practices. If it were rare among programmers to revert back to unsafe practices, many of the complaints about C++ would be moot. Sadly, the retro-C practices are not rare. It just too convenient to code the way we did in C. Java, a member of the C family of languages, has taken the approach of deleting certain capabilities of C and C++. For pointers, Java has adopted a model which closely resembles Ada access types. Even so, Java syntax is still reminiscent of C. A Java programmer can still make some of the same coding errors that occur in C programs. In the end, it is not a matter of whether we can code the same thing in one language that we can code in another. It is a matter of how that same thing is expressed. It is not a matter of which syntax is more "natural"; not a matter of whether we do or do not have "distinguished receivers"; not a matter of how easy it is to code a particular set of ideas. Expressibility, in Ada, is a matter of creating reliable, maintainable applications in which human life and safety are at risk. For large, safety-critical software, whether that expressibility consistently represents (even demands) a model for reliability, dependability and safety. This defines the charter for Ada. Richard Riehle richard@adaworks.com http://www.adaworks.com Of course, the notion of safety-critical becomes also becomes moot when developing for one of the non-safe operating systems that are being selected for so many of our military applications.