comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: Why doesn't Ada allow user-defined attributes?
Date: Sat, 22 Jul 2017 18:33:22 +0200
Date: 2017-07-22T18:33:22+02:00	[thread overview]
Message-ID: <okvuh3$o1h$1@dont-email.me> (raw)
In-Reply-To: <oktl9p$1ijd$1@gioia.aioe.org>

On 21.07.17 21:39, Dmitry A. Kazakov wrote:
> On 2017-07-21 19:11, Georg Bauhaus wrote:
>> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> 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?
>
> Unordered set cannot be enumerated,

https://en.wikipedia.org/wiki/Enumeration

> Lots of external things cannot be, e.g. a file you have no permission to read.

A file needs to have been _counted_ byte by byte,
or allocated using a known _count_ of bytes, etc.
in order to have this length.
Permissions don't change this state of affairs.


  reply	other threads:[~2017-07-22 16:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20  0:02 Why doesn't Ada allow user-defined attributes? Shark8
2017-07-20  9:34 ` Brian Drummond
2017-07-20 16:07   ` Shark8
2017-07-21  4:46     ` Georg Bauhaus
2017-07-21  7:08       ` Dmitry A. Kazakov
2017-07-21 17:11         ` Georg Bauhaus
2017-07-21 19:39           ` Dmitry A. Kazakov
2017-07-22 16:33             ` G.B. [this message]
2017-07-22 20:12               ` Dmitry A. Kazakov
2017-07-23  6:41                 ` G.B.
2017-07-23  8:22                   ` Dmitry A. Kazakov
2017-07-24 17:52                     ` G.B.
2017-07-20 18:53 ` Randy Brukardt
2017-07-20 23:58 ` Matt Borchers
2017-07-21  7:14   ` Simon Wright
replies disabled

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