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!news.eternal-september.org!feeder.eternal-september.org!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: 'Protected' abstract subprograms Date: Wed, 15 Jan 2014 16:21:57 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <839fee13-2743-49f6-a7f3-f95578386201@googlegroups.com> <1aav8alqsnqqv.5urmifgwh1mv.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1389820936 22058 192.74.137.71 (15 Jan 2014 21:22:16 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 15 Jan 2014 21:22:16 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:4l7E0pNiosnJifL9MaB18cH8a0Y= Xref: news.eternal-september.org comp.lang.ada:18186 Date: 2014-01-15T16:21:57-05:00 List-Id: adambeneschan@gmail.com writes: > Or it could just mean that Ada didn't provide a complete enough way > for generics to put conditions on the actual parameters.You can say > "type T is private;", in which case the actual must be nonlimited; or > you can say "type T is limited private;", in which case the actual may > be limited or nonlimited. But you don't have a way to say "the actual > must be limited", which is what would be needed here. Yes, that approach could work, but there are dozens of these "generic private part" rules in the RM, and I suspect they all break privacy. >...(And similarly > for "tagged"; generics don't have a way to say "the actual must be > untagged", and it seems that I submitted an AI in the last year or two > about a case where using a tagged type as an actual for a generic > formal private type led to a language hole involving derived types.) - Bob