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, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!princeton!allegra!alice!bs From: bs@alice.UUCP Newsgroups: comp.lang.ada Subject: Re: C++ & Real-time Message-ID: <6736@alice.uUCp> Date: Fri, 20-Mar-87 10:22:34 EST Article-I.D.: alice.6736 Posted: Fri Mar 20 10:22:34 1987 Date-Received: Sun, 22-Mar-87 21:19:22 EST References: <870319210239.06g@Jpl-VLSI.ARPA> Organization: AT&T Bell Laboratories, Murray Hill NJ Summary: C++ and Ada List-Id: larry@JPL-VLSI.ARPA.UUCP (larry @ The ARPA Internet) writes > C++: I realize Stroustrup began it as an experiment, but I get the > impression AT&T is encouraging it for reasons of their own. Correct. My (naturally biased) impression is that AT&T (that is, AT&T management) is encouraging the use of C++ because they think that their programmers like it (many do) and because they think using C++ improves productivity and quality significantly (it often does). > I find it interesting that things ordinary C hackers scream about in Ada > (strong typing, various black-boxing features) have been added by the el > primo C hackers at AT&T. Yes. There is an important point, however, C++'s type structure is very flexible (so that it rarely gets in your way), and allows the usual C tricks when needed (e.g. direct access to memory for bit-fiddling, interupt handling, etc, and functions with partially checked argument lists, such as printf()). This flexibility difuses some of the fear that ``ordinary C hackers'' have when you say ``strong typing''; they fear you want to force them to go back to programming in vanilla Pascal. > And some of its features do seem similar to Ada. In classes (packages) all > data is private unless declared public, for instance. A class is a type not a package. Anyway any two languages defined in the same world at approximately the same time for approximately the same range of applications will have similarities. It is probably fair to say that C++ resembles Ada in the same way that C resembles Pascal. > Operators and functions can be overloaded (assignment cannot). Assignment can be overloaded in C++. > Classes can be generic. We may have a problem with terminology here. As I understand the term ``generic'' (parameterized with a type), C++ classes cannot be generic. You can use derivation (sub-classes), pointers to functions, and/or macros to achieve polymorphism, but there are no direct support for Ada-like generics in C++ (this is not a critisism of Ada). > Other features, as Richard Welty points out, are closer to Simula. Exactly.