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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.157.53.73 with SMTP id l9mr2957852ote.145.1498178721296; Thu, 22 Jun 2017 17:45:21 -0700 (PDT) X-Received: by 10.157.82.166 with SMTP id f38mr141637oth.8.1498178721263; Thu, 22 Jun 2017 17:45:21 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!185no1021095itv.0!news-out.google.com!k7ni2275itk.0!nntp.google.com!f20no1022978itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 22 Jun 2017 17:45:21 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=137.103.119.68; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 137.103.119.68 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: derived formal types and known discriminants From: sbelmont700@gmail.com Injection-Date: Fri, 23 Jun 2017 00:45:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47064 Date: 2017-06-22T17:45:21-07:00 List-Id: Can any language lawyer explain the reasoning behind precluding known discr= iminants for general formal derived types? For example, I can write this: generic type T is new P with private; -- constrained (i.e. none) =20 and I can write this: generic type T (<>) is new P with private; -- unconstrained (i.e. any) =20 But I can't write generic type T (foo : Integer) is new P with private; -- (just one integer) =20 presumably because 12.5.1~11/3 says "The declaration of a formal derived ty= pe shall not have a known_discriminant_part", to wit GNAT complains "discri= minants not allowed for this formal type". It would seems as though if unk= nown discriminants are legal, known would be an easier subset, and my inter= est has been piqued to the reason why. Thank you for any insight -sb