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!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada case-statement Date: Thu, 15 Mar 2018 17:05:27 -0500 Organization: JSA Research & Innovation Message-ID: References: <365d65ea-5f4b-4b6a-be9b-1bba146394ab@googlegroups.com> <87k1udvkuh.fsf@jacob-sparre.dk> Injection-Date: Thu, 15 Mar 2018 22:05:28 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="22863"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:51011 Date: 2018-03-15T17:05:27-05:00 List-Id: "Jacob Sparre Andersen" 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.