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: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Why doesn't Ada allow user-defined attributes? Date: Fri, 21 Jul 2017 17:11:28 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 21 Jul 2017 17:11:28 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="c70c1804a9dfe543a64835bbd947b390"; logging-data="22106"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tcEWjE0tS2Aj0yvZmVzqlhY//PgUoKT4=" User-Agent: NewsTap/5.2.6 (iPhone/iPod Touch) Cancel-Lock: sha1:gMOx7llFdTYcQ/d/RRwDeRf7pvk= sha1:ljSIGQPa7pWbvwAoF9X2kHN2gZI= Xref: news.eternal-september.org comp.lang.ada:47491 Date: 2017-07-21T17:11:28+00:00 List-Id: Dmitry A. Kazakov wrote: > On 21/07/2017 06:46, Georg Bauhaus wrote: > >> Do you really need 'Length? > > Sure, when for example the result depends on the number of elements. Count is computed easily, albeit inefficiently, or even efficiently whenever a collection type caches its number of elements. So, is 'Length, if not a static property, more than a prim op? > 'Length is a general property of any container (set). > >> It seems an implementation detail whenever the language doesn't have forall >> or exists. > > Enumeration requires some additional assumptions, stronger than length. What real thing can be counted yet not one by one?