comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada case-statement
Date: Thu, 15 Mar 2018 17:05:27 -0500
Date: 2018-03-15T17:05:27-05:00	[thread overview]
Message-ID: <p8eqn8$maf$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: 87k1udvkuh.fsf@jacob-sparre.dk

"Jacob Sparre Andersen" <jacob@jacob-sparre.dk> wrote in message 
news:87k1udvkuh.fsf@jacob-sparre.dk...
> Randy Brukardt wrote:
...
>> We have been considering making the subtype name in an object renames
>> optional -- the subtype is a lie anyway (since it is ignored
>> semantically), and other important properties of the renamed object
>> like "constant" are omitted. That's about as far as I will go for
>> typeless declarations (and perhaps even that is too far).
>
> Wouldn't it be more informative for the reader, if one was forced to use
> the name of the first subtype in object renames?  (Yes.  I know.  Not
> backwards compatible.)

Surely, but that still would be confusing if the first subtype is 
constrained (an object can have a different constraint, such as a slice of a 
constrained array). Static matching would be better. Ichbiah, however, 
didn't want to define static matching (John Goodenough dug out the relevant 
e-mail thread a few years back - it says precisely that). Of course, one of 
the first things Tucker and the Ada 9x group did was define static matching 
to get rid of silly runtime checks in generic instances. Once you have 
static matching, you can just require that - but, as you say, that's too 
incompatible to consider.

(Even more confusing is the fact that null exclusions are required to 
match - we didn't want even more wrong stuff. Not sure that was a good idea 
in hindsight.)

> Removing the type information completely would in my view make the
> source text even harder to read.  But maybe only for people who
> understand (some of) the intricacies of object renames.

It certainly would be better, IMHO, to have some unconstrained type 
specified so you can find the *type* information. But that would require 
declarations like:
     Obj : Integer'Base renames ...;
which would drive people crazy.

It would be better still not to have renames at all, but there are just 
enough practical uses to put up with it.

                                     Randy.



  reply	other threads:[~2018-03-15 22:05 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 17:35 Ada case-statement Stephen Davies
2018-03-14 17:49 ` Dmitry A. Kazakov
2018-03-15  0:57   ` Robert I. Eachus
2018-03-15  3:10     ` Dan'l Miller
2018-03-15  5:54       ` J-P. Rosen
2018-03-15  7:56         ` Niklas Holsti
2018-03-15 12:21           ` Dan'l Miller
2018-03-15 17:22             ` Mill processor (Was: Re: Ada case-statement) Niklas Holsti
2018-03-15 21:50     ` Ada case-statement Randy Brukardt
2018-03-14 22:22 ` Mehdi Saada
2018-03-14 23:16 ` Randy Brukardt
2018-03-15  5:04   ` gautier_niouzes
2018-03-15  7:50   ` Jacob Sparre Andersen
2018-03-15 22:05     ` Randy Brukardt [this message]
2018-03-15  8:37   ` Dmitry A. Kazakov
2018-03-15 22:20     ` Randy Brukardt
2018-03-16  8:54       ` Dmitry A. Kazakov
2018-03-16 23:49         ` Randy Brukardt
2018-03-17  7:59           ` Dmitry A. Kazakov
2018-03-15 15:37   ` Stephen Davies
2018-03-15 16:33     ` J-P. Rosen
2018-03-15 17:01       ` Dmitry A. Kazakov
2018-03-15 18:41         ` Shark8
2018-03-15 21:12           ` Jeffrey R. Carter
2018-03-18  5:41             ` Robert I. Eachus
2018-03-18  6:57               ` Spiros Bousbouras
2018-03-18  9:17               ` Jeffrey R. Carter
2018-03-18 12:53                 ` Simon Wright
2018-03-15 18:50     ` Jere
2018-03-15 20:40       ` Anh Vo
2018-03-15 22:24     ` Randy Brukardt
2018-03-16  9:53       ` Stephen Davies
2018-04-03 17:56   ` marciant
replies disabled

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