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.52.53.2 with SMTP id x2mr2853772vdo.3.1389391231600; Fri, 10 Jan 2014 14:00:31 -0800 (PST) X-Received: by 10.49.110.165 with SMTP id ib5mr94407qeb.28.1389391231574; Fri, 10 Jan 2014 14:00:31 -0800 (PST) Path: border1.nntp.dca.giganews.com!nntp.giganews.com!p15no7311990qaj.0!news-out.google.com!l9ni13399qay.0!nntp.google.com!p15no7311985qaj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 10 Jan 2014 14:00:31 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <839fee13-2743-49f6-a7f3-f95578386201@googlegroups.com> Subject: 'Protected' abstract subprograms From: sbelmont700@gmail.com Injection-Date: Fri, 10 Jan 2014 22:00:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:184391 Date: 2014-01-10T14:00:31-08:00 List-Id: I find it to be a fairly common occurrence and, depending on who you ask, a= programming best practice to have a publically visible non-abstract dispat= ching operation re-dispatch to an abstract subprogram (i.e. the 'template p= attern'). But Ada cannot have abstract private subprograms, presumably "be= cause a nonabstract type extension declared outside the package would not k= now about any abstract primitive subprograms..." But this doesn't really seem like the case, since A) it can already kind of= 'see into' the private part to actually extend the type and B) the private= part of a child package can *actually* see into the private part of the pa= rent, which is presumably where the operation would be overridden anyhow. = C++ can have protected/private pure virtual functions, so what's stopping A= da? In any case, does anyone know of a workaround to achieve the same sort of b= ehavior? I can always just leave both subprograms public, but that leaves = an ugly scab I just need to pick at. -sb