Re: Teaching new tricks to an old dog (C++ -->Ada)

From: xpyttl (xpyttl_NOSPAM_at_earthling.net)
Date: 03/05/05


Date: Sat, 5 Mar 2005 15:24:44 -0500


"Larry Kilgallen" <Kilgallen@SpamCop.net> wrote in message
news:tx+GQm7$4SnO@eisner.encompasserve.org...

> > - You might end up making more mistakes with Ada because of
> > inexperience with Ada.
>
> But if you do, they will typically be caught at compile-time.

I would argue that this isn't strictly true. Of course, the bonehead errors
will be caught by the compiler, but the same is true for C++.

I found that, while I could write servicible code pretty quickly in Ada, it
took a long time, coming from C (and Pascal before that), to really
understand how to exploit the language.

By way of example, someone in this thread posted an example using a
Day_of_Month type. It would never occur to a C programmer that the day of
the month was anything other than an integer. At the other extreme, once
discovering all this wonderful capability, it is very easy to get carried
away and take it to extremes. It takes quite some experience to understand
the correct balance for just this one useful feature of the language.

I also feel that Ada programs are more difficult -for experienced
programmers- to read. Sure, any Joe off the street can probably get more
from an Ada program than a C++ program, but C and C++ have a lot of idioms
that express fairly large concepts in immediately recognizable ways. With
Ada, not only is there less of this, but the language is so wordy that even
simple functions seem to go on and on.

Still, if I was back doing safety critical code, I don't think I could
honestly argue that C++ was a viable choice.

..



Relevant Pages

  • Re: Re-Marketing Ada (was "With and use")
    ... > can be used by other Ada programs (in thinish ... > binding mode). ... > minding than Ada (for object structures, includes, and a lot of other stuff ... just the C/C++ header files -- not entire programs or code. ...
    (comp.lang.ada)
  • Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... they will typically be caught at compile-time. ... I would argue that this isn't strictly true. ... I found that, while I could write servicible code pretty quickly in Ada, it ... I also feel that Ada programs are more difficult -for experienced ...
    (comp.lang.cpp)
  • Re: C bindings, Interfaces.C.Pointers etc.
    ... > Ada programs to access elements of the arrays using ... > standard array notation. ... The trick is in the last line. ...
    (comp.lang.ada)
  • Re: NOACE- End of the road for Ada?
    ... The DoD doesn't want China to use Ada for their own military software, ... the Chinese spies will ignore and dismiss Ada programs as ...
    (comp.lang.ada)
  • Re: why learn C?
    ... powerful mechanisms to write high-level type-safe code. ... Do Ada programmers make do with run-time type checking, ... ++ allows compile-time type checking that is impossible in Ada. ...
    (comp.lang.ada)