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 X-Received: by 10.182.128.72 with SMTP id nm8mr63513583obb.36.1451579422500; Thu, 31 Dec 2015 08:30:22 -0800 (PST) X-Received: by 10.182.49.197 with SMTP id w5mr189906obn.16.1451579422475; Thu, 31 Dec 2015 08:30:22 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!mv3no23717325igc.0!news-out.google.com!f6ni39123igq.0!nntp.google.com!mv3no23717324igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 31 Dec 2015 08:30:22 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.99.9.146; posting-account=s89PEgoAAABHs2ETFyOrCeTQVQJAfzKq NNTP-Posting-Host: 75.99.9.146 References: <5be84c5a-9614-4ee2-ae85-beb962171a05@googlegroups.com> <192c4493-9c53-4e23-b9bd-e4c543738dbc@googlegroups.com> <26e20ae9-ad86-4c88-9c67-f1a4a9b33f23@googlegroups.com> <677d0956-63d3-4de8-a6e5-b79c52a1dc12@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <562f3cd1-b66d-465f-aa89-7d0b7b0e5ea4@googlegroups.com> Subject: Re: Overriding puzzle From: marciant@earthlink.net Injection-Date: Thu, 31 Dec 2015 16:30:22 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28952 Date: 2015-12-31T08:30:22-08:00 List-Id: On Wednesday, December 30, 2015 at 6:10:30 PM UTC-5, Randy Brukardt wrote: > wrote in message=20 > news:677...@googlegroups.com... > > On Wednesday, December 30, 2015 at 1:24:06 PM UTC-5,=20 > > gautier...@hotmail.com wrote: > >> No, the "A'Class(o)" also makes the difference when type Custom > >> is framed into a package: > > > ... > > General note to self: tagged type operations that call other operations= of=20 > > the type should always(?) convert the object to its 'class so as to cau= se=20 > > dispatching. Not doing so is probably a defect! >=20 > Nooooo. Redispatching is best left for very limited circumstances. There'= s a=20 > reason that Ada makes you write it explicitly! > In limited circumstances=20 > (like the OP), it works well, but for general programming, look out! So, you mean that it would be wrong to try to fall back on the general rule= that I stated and that judgement is always necessary in each specific case= . In this case you agree that it goods well. If the case was such that it wo= uld not work well, should the parent type have the "not-to-be-dispatched-to= " subprogram be declared as class-wide? Would you consider it a defect in = the implementation of the parent type if such a subprogram was not class-wi= de? Shouldn't making a primitive tagged subprogram visible mean that it is= thought to be fine to expect that any internal redispatching (that may or = may not be caused) would "work well"? I know - a lot of questions. But in summary, I'm thinking that you mean that careful case by case design= is necessary.=20