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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Introductory Ada Programming Book Date: Wed, 4 Jan 2017 13:40:22 +0100 Organization: A noiseless patient Spider Message-ID: References: <87r34j39u6.fsf@nightsong.com> <7643d59e-061f-42df-adda-9322608f127b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 4 Jan 2017 12:38:55 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="7cc38682ae4317016e65a2ffe93618b8"; logging-data="20273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ZdV1/UO51+gEgEZb1wq2a" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: Cancel-Lock: sha1:w7Je9jomVpfC6xHIrQz1KjL8xiA= Xref: news.eternal-september.org comp.lang.ada:33039 Date: 2017-01-04T13:40:22+01:00 List-Id: Le 04/01/2017 à 10:25, raph.amiard@gmail.com a écrit : > >> Nice in its presentation and intent, but unfortunately carries a >> lot of inexact stuff. Maybe the community could help (politely) the >> guy... > > I read it some time ago, but I didn't find a lot of inexact stuff. > Would you mind giving more details ? > Some excerpts: exit when (a == 0) Switch statements must cover all possible input values --- for unbounded types like integers, a when others is mandatory. Oddly, variables are not initialised by default (Personal opinion: default initialization is a huge mistake) Ada is, alas, a one-pass language, so things need to be prototyped if you're going to refer to them before they're defined. Plus you can omit the parentheses when calling zero-argument functions and procedures; (You must!) type Vector is array(integer range<>) of float; These are a little bit deceptive. They don't represent an array which can change in size; they represent an array whose size is not known by the type system. They're implemented via a combination of fat pointers and fixed-size arrays, depending on context. They can be used as a shortcut in declaring variables, but they're mostly useful as parameters. ---------- etc... Often not really wrong, but imprecise or incorrect -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr