comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <nonlegitur@futureapps.invalid>
Subject: Re: Why doesn't Ada allow user-defined attributes?
Date: Fri, 21 Jul 2017 04:46:04 -0000 (UTC)
Date: 2017-07-21T04:46:04+00:00	[thread overview]
Message-ID: <oks0uc$8b3$1@dont-email.me> (raw)
In-Reply-To: d4f34acd-8c03-41af-9caf-0369a9883905@googlegroups.com

Shark8 <onewingedshark@gmail.com> wrote:
> On Thursday, July 20, 2017 at 3:38:52 AM UTC-6, Brian Drummond wrote:
>> 
>> Offhand I'm not sure I can see similar purposes for extending Ada's 
>> attributes. 
>> 
>> Got any use cases in mind?
> 
> Yes; several.
> 
> 
> Second, and more intimidate, would be allowing Ada.Containers to
> implement a full Array interface, where appropriate. (e.g. having
> Vector'Length and Vector'Range; this consistency of interface will be
> nice as then you wouldn't have to remember "I'm using a vector, I have to
> use V.Length *not* V'Length.")
> 

Do you really need 'Length?
It seems an implementation detail whenever the language doesn't have forall
or exists.
So, I'd rather want to use arrays with the generalized iteration scheme.
(Granted, I don't need to write Binary Search etc.)

  reply	other threads:[~2017-07-21  4:46 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 [this message]
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.
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