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,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: adaworks@netcom.com (AdaWorks) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/02 Message-ID: #1/1 X-Deja-AN: 145546598 sender: adaworks@netcom20.netcom.com references: <4jjul6$637@ra.nrl.navy.mil> <3160ACC6.7FC@mcs.com> organization: NETCOM On-line Communication Services (408 261-4700 guest) newsgroups: comp.lang.ada Date: 1996-04-02T00:00:00+00:00 List-Id: Mike Young (mikey@mcs.com) wrote: : Richard Riehle AdaWorks wrote: : > : > It really annoys me when I pick up someone's : > program and find nested declare blocks several pages long. Imagine : > what this would like in C++. : ======== : Tut tut, Richard. Save the cheap shots for when they're absolutely : necessary. Agreed. My gratuitous reference to C++ is inappropriate. My point, obfuscated by my "cheap shot," was that I am not a proponent of ad hoc variables whether they are disguised within "declare ... end" statements are drift freely through the code like little pieces of floatsom. On the other hand I realize that this is often an important and useful feature of a programming language even though it is easily abused. : It's rare to find even poorly written C++ code "several pages long," let : alone nested scopes that size. You can find poor programmers in any : discipline, apparently. HmmmMMMMmmmm. Perhaps a case could be made that the Ada declare block actually encourages bad coding style because of its easy readability. Whereas other languages provide a greater incentive for programmers to be economical in their use of this feature because of the potential for misinterpretation. : ======= : Out on a limb even further, I'm rather struck by how strongly Ada attempts : to enforce a certain set of coding standards. It took two readings of : Barne's book to pluck out the grammar from the syntactic rules. Actually, the primary management-level issues in Ada are threefold: 1) The compiler should catch the maximum number of errors possible through every stage of the software lifecycle, 2) The run-time executive should catch the remaining errors in a way that can be handled via source code statements, 3) A deployed Ada program should be extensible, and maintainable with minimal risk to the existing design. Nearly everything in the Ada language is designed to satisfy these goals throughout the full life-cycle of an Ada program. Supporting ideas such as readability, understandability, OOP, etc., are simply mechanisms for implementing those goals. I realize that some readers will have alternate viewpoints or even refinements, or supplemental goals vis a vis my rather bold declaration. So be it. Not all languages are designed to satisfy the same management goals. Richard Riehle adaworks@netcom.com -- richard@adaworks.com AdaWorks Software Engineering Suite 27 2555 Park Boulevard Palo Alto, CA 94306 (415) 328-1815 FAX 328-1112