comp.lang.ada
 help / color / mirror / Atom feed
From: bs@alice.UUCP
Subject: Re: C++ & Real-time
Date: Fri, 20-Mar-87 10:22:34 EST	[thread overview]
Date: Fri Mar 20 10:22:34 1987
Message-ID: <6736@alice.uUCp> (raw)
In-Reply-To: 870319210239.06g@Jpl-VLSI.ARPA



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.

      reply	other threads:[~1987-03-20 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-03-20  5:02 C++ & Real-time larry
1987-03-20 15:22 ` bs [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox