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 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,ef0074ec236ba6e3 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,ef0074ec236ba6e3 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,b19fa62fdce575f9 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,ef0074ec236ba6e3 X-Google-Attributes: gid1108a1,public X-Google-Thread: 108717,ef0074ec236ba6e3 X-Google-Attributes: gid108717,public X-Google-ArrivalTime: 1994-11-30 13:06:05 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!pipex!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada,comp.lang.c,comp.programming,comp.lang.c++,comp.object Subject: Re: Why don't large companies use Ada? Date: 30 Nov 1994 20:17:21 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3bimkh$149q@watnews1.watson.ibm.com> References: <3aa7jo$7j@Starbase.NeoSoft.COM> <3b5ajt$n86@news-2.csn.net> <3b5h8q$de0@felix.seas.gwu.edu> <3bd06n$kbt@felix.seas.gwu.edu> <1994Nov29.154220.27952@cognos.com> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Xref: bga.com comp.lang.ada:8106 comp.lang.c:32636 comp.programming:5509 comp.lang.c++:39000 comp.object:9191 Date: 1994-11-30T20:17:21+00:00 List-Id: In article <1994Nov29.154220.27952@cognos.com>, vernestd@cognos.COM (Dave Vernest) writes: |> With the use of C++, which supports generics and exception- |> handling, is there any reason to code mission-critical systems |> in Ada anymore?? Advantages / disadvantages?? Just a few reasons that spring to mind quickly: validated compilers multitasking cross-compilation-unit checks that don't depend on the programmer using #include "properly" version-consistency checks automatically built into the construction of a program a type system strong enough to distinguish between pointers to a T and an array of T's, and thus to prevent at compile time mistakes like "delete X" when "delete [] X" was meant a type system strong enough to distinguish between the low-level notion of a machine address and the high-level notion of indirect access a type system strong enough to distinguish among integer types used for different purposes the ability to declare integer data portably, based on expected range rather than the expected size of a given predefined type on a given machine language-defined run-time checks, integrated with exception handling compile-time and run-time checks to prevent dangling pointers extraordinary difficulty of clobbering memory accidently in units that do not explicitly import low-level mechanisms, so that debuggers are rarely necessary in debugging high-level Ada programs EFFICIENT generics, whose implementation is based on a decade and a half of lessons learned and the presence of an explicit instantiation encapsulation of method implementations in a package body compile-time consistency checks for templates and instantiations in Ada 94, a standard set of string-manipulation routines that (unlike the C-library string routines) free the programmer from low-level storage-management concerns a standard math library language rules about numerical accuracy (applicable when the target machine is not a Pentium :-) ) in Ada 94, strong support for commercial applications, including picture-based formatting and exact scaled arithmetic (decimal fixed-point types) explicit control over elaboration order (roughly analogous to invocation of C++ constructors for static and extern objects) a standardized and universally implemented approach to namespace management (packages and, in Ada 94, child units) rigorous control over bit-by-bit layout, when needed standard mechanisms for interrupt handling readable notation ("is abstract" vs. "= 0", ...) coherent notation (if int *a[] means that *a[i] is an int, int &a[] should mean that &a[i] is an int, but it means nothing of the kind) symmetric handling of binary operations and enforced consistency of operand tags when appropriate explicit declaration of variables whose address may be taken, facilitating program understanding and code optimization lots of technical advantages that are minor by themsleves but add up to signficantly greater expressiveness and/or reliability, for example: named notation in aggregates and subprogram calls (understood by the compiler); aggregates allowed in places other than initial values; overloading that can be resolved based on function result type; rules for identifiers (case insensitivity, no consecutive underscores) that make typographical errors less likely; case statements that don't require a break statement after each alternative; if statements that don't require braces to be added when an arm is extended from one statement to two; distinct opening and closing brackets for different constructs that can be checked by the compiler for consistency; end brackets required for all loops, thus avoiding traps like while(condition); statement_to_be_repeated; binary integer literals when appropriate; ability to default subprogram parameters while still providing values for later parameters; etc., etc., etc. -- Norman H. Cohen ncohen@watson.ibm.com