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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin.stu.neva.ru!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Differences between Ada 83 and other revisions Date: Thu, 13 Feb 2014 21:44:47 +0200 Organization: Tidorum Ltd Message-ID: References: <19ac8735-7a9c-429f-a111-a1b3c4b0985b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net LLvj6fQMuqNzXnKXoZs6fQD71k61Zf+ol9DonzR2I22Yatb7Yd Cancel-Lock: sha1:cLMc0Z5iR56Az6YSpzXtyr3TlJk= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <19ac8735-7a9c-429f-a111-a1b3c4b0985b@googlegroups.com> X-Original-Bytes: 3161 Xref: number.nntp.dca.giganews.com comp.lang.ada:184837 Date: 2014-02-13T21:44:47+02:00 List-Id: 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 . @ .