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!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: derived formal types and known discriminants Date: Fri, 23 Jun 2017 12:26:11 -0500 Organization: JSA Research & Innovation Message-ID: References: NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1498238772 22754 24.196.82.226 (23 Jun 2017 17:26:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Jun 2017 17:26:12 +0000 (UTC) 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.6157 Xref: news.eternal-september.org comp.lang.ada:47085 Date: 2017-06-23T12:26:11-05:00 List-Id: wrote in message news:a9316065-923c-439e-9176-8f3eb469c601@googlegroups.com... >Can any language lawyer explain the reasoning behind precluding known >discriminants >for general formal derived types? I don't know, I can only guess. And my guess would be that discriminants that are added/removed would be a problem. Within the generic, you could declare objects giving those discriminant values, but they might not be right. For a type with unknown discriminants, you can't declare an object at all, so that's easier. But why using the same matching rules used for formal private types wouldn't work, I don't know. Or maybe it just didn't seem worth worrying about, given that formal derived types are mainly useful to give Steve Baird a rare mechanism for the amazing semantic issues that he comes up with. (Yes, formal tagged derived types have some uses in deep type hierarchies, and that's about it, because no one declares other kinds of derived types in the first place.) Randy.