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,WEIRD_PORT 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!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada design bug or GNAT bug? Date: Mon, 22 Jun 2015 12:39:16 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <4lrj5zz2u2z.u8x9cf7xzic6.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1434994756 5864 24.196.82.226 (22 Jun 2015 17:39:16 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 22 Jun 2015 17:39:16 +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:26417 Date: 2015-06-22T12:39:16-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:4lrj5zz2u2z.u8x9cf7xzic6.dlg@40tude.net... > On Sat, 20 Jun 2015 21:42:44 -0500, Randy Brukardt wrote: ... >>> p2.ads:5:09: type must be declared abstract or "Foo" overridden >>> p2.ads:5:09: "Foo" has been inherited from subprogram at p1.ads:4 >>> p2.ads:6:24: private function with tagged result must override >>> visible-part function >>> p2.ads:6:24: move subprogram to the visible part (RM 3.9.3(10)) >>> >>> [ Since when access types became tagged? ] >> >> They're not "tagged", but they dispatch as if they were tagged (if >> anonymous). So they have to follow the same rules as with a tagged type. > > Then it should be said this way. I believe RM uses the word "controlling" > for this on other occasions. The RM uses it in *this* occassion, too. Don't blame Ada for some implementation's confusing error messages! ... >> If there's a design bug, >> it's the existence of anonymous access types at all with these unusual >> special properties. > > Maybe, but once introduced they should not break more important language > features, like information hiding. What part of "anonymous access types are evil" did you fail to understand?? :-) The mistake I regret more than any other was allowing their use to be expanded, for a purpose that doesn't really work, with semantics that are far more complex than anyone really wanted. We don't have a choice about allowing hidden controlling results and controlling access results (unless, of course, we want to abandon real privacy, which we're not going to do). The only way to avoid that problem is to not have the feature at all (which is where I would stand). But as they exist, they have to work this way. Sorry. Randy.