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: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Introductory Ada Programming Book Date: Wed, 4 Jan 2017 23:08:19 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <87r34j39u6.fsf@nightsong.com> <7643d59e-061f-42df-adda-9322608f127b@googlegroups.com> <5b52afcc-120e-41a5-bab2-7f5c6f647cc2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 4 Jan 2017 22:06:47 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b19843139a0ae9036755508e8a63b9c2"; logging-data="18163"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/mmAq/DfAVnoafGv1c+v8rEZeEF3vDgY=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: <5b52afcc-120e-41a5-bab2-7f5c6f647cc2@googlegroups.com> Cancel-Lock: sha1:/7Xcn+skM9+ldU+wRM8HS0OczZg= Xref: news.eternal-september.org comp.lang.ada:33057 Date: 2017-01-04T23:08:19+01:00 List-Id: On 01/04/2017 02:44 PM, raph.amiard@gmail.com wrote: >> >> 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. > > I'm not sure what is incorrect here. "They're implemented via a combination of fat pointers and fixed-size arrays" is wrong. It's not clear what "They" refers to; it seems to refer to the type, but types aren't implemented, so it probably refers to objects of the type. But such objects are not "implemented via a combination of fat pointers [which don't exist in Ada] and fixed-size arrays". Also, "they're mostly useful as parameters" would seem to imply that type String is not very useful except as parameters, which is certainly not my experience. -- Jeff Carter "Why, the Mayflower was full of Fireflies, and a few horseflies, too. The Fireflies were on the upper deck, and the horseflies were on the Fireflies." Duck Soup 95