comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Differences between Ada 83 and other revisions
Date: Thu, 13 Feb 2014 21:44:47 +0200
Date: 2014-02-13T21:44:47+02:00	[thread overview]
Message-ID: <bm4ll9Fjs95U1@mid.individual.net> (raw)
In-Reply-To: <19ac8735-7a9c-429f-a111-a1b3c4b0985b@googlegroups.com>

On 14-02-13 17:59 , yoursurrogategod@gmail.com wrote:
> Hello.  I'm new to Ada, but I would like to get a slightly better
> understanding of the language.

Welcome...

> I like how the Ada compiler is so
> careful, something I rarely see in other languages.

Me too.

> From what I've read and heard, Ada 83 compiler was very strict about
> what type of code could be compiled and as a result made code that
> ran as programmed most of the time.

I have personal experience of this effect, with all versions of Ada. The
language and compiler are strict, which has two consequences: firstly,
it encourages you to design and code more carefully and thoughtfully,
else your code will not pass the compiler; secondly, the compiler will
really discover some kinds of logical errors at compile time. Both make
it more likely that the program will actually work as intended, once it
compiles correctly.

> However, later revisions have weakened some of these rules for
> Ada 95 and onward.  Is this true?

As other posters have noted, Ada 95 relaxed some Ada 83 rules which were
more "stylistic" than logically necessary. So Ada 95 and later standards
give more room for different coding styles, while still giving the same
semantic rigour. I don't believe that this makes Ada programs more
likely to fail at run time.

However, Ada 95 and later Ada standards extend the language beyond Ada
83 in many ways. Some extensions include new kinds of run-time checks
for new kinds of run-time errors, which cannot be detected at compile
time. Ada 83 had a smaller set of run-time checks and errors, so it can
be argued that programs using the Ada 95 and later extensions have an
increased risk of failing at run-time even if their compilation succeeds.

I don't know if this argument is valid; I don't see an increased risk of
run-time failure in my own programming. But I use the new features
rather conservatively and sparingly. Moreover, some of the new features
make it easier to avoid some Ada 83 -level run-time errors -- for
example, controlled types help to avoid errors in memory allocation and
deallocation.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .


  parent reply	other threads:[~2014-02-13 19:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 15:59 Differences between Ada 83 and other revisions yoursurrogategod
2014-02-13 16:12 ` adambeneschan
2014-02-13 18:00   ` yoursurrogategod
2014-02-13 18:07 ` AdaMagica
2014-02-13 19:44 ` Niklas Holsti [this message]
2014-02-13 21:25   ` yoursurrogategod
2014-02-13 22:00     ` Niklas Holsti
2014-02-13 22:18       ` adambeneschan
2014-02-14 13:18         ` yoursurrogategod
2014-02-14 13:53           ` AdaMagica
2014-02-14 14:06           ` Jacob Sparre Andersen
2014-02-14 16:47           ` adambeneschan
2014-02-14 14:08         ` Robert A Duff
2014-02-16  9:36         ` Martin
2014-02-16 14:13           ` Robert A Duff
2014-02-16 15:58             ` J-P. Rosen
2014-02-19 22:09               ` Robert A Duff
2014-02-19 22:23                 ` J-P. Rosen
2014-02-19 22:37                   ` Robert A Duff
2014-04-19  8:59                     ` Jacob Sparre Andersen
2014-02-19 22:34                 ` adambeneschan
2014-02-19 22:58                   ` Robert A Duff
2014-02-13 21:28 ` yoursurrogategod
2014-02-13 23:31   ` Randy Brukardt
2014-02-20 10:30     ` john
replies disabled

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