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.182.196.34 with SMTP id ij2mr25583612obc.24.1448288198391; Mon, 23 Nov 2015 06:16:38 -0800 (PST) X-Received: by 10.182.144.200 with SMTP id so8mr299502obb.5.1448288198358; Mon, 23 Nov 2015 06:16:38 -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!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!mv3no633216igc.0!news-out.google.com!l1ni6458igd.0!nntp.google.com!mv3no633213igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 23 Nov 2015 06:16:38 -0800 (PST) In-Reply-To: <127g5diox4xef$.1bc0ja7q2xobo.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.107.233.114; posting-account=6m7axgkAAADBKh082FfZLdYsJ24CXYi5 NNTP-Posting-Host: 94.107.233.114 References: <1e4hyjazuvi88.159qsn7u0y067$.dlg@40tude.net> <817c092d-4c49-4b09-a116-6d27d4d20291@googlegroups.com> <127g5diox4xef$.1bc0ja7q2xobo.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <26b461b8-3a2e-4fee-906f-673c7ff22543@googlegroups.com> Subject: Re: operation can be dispatching in only one type From: Serge Robyns Injection-Date: Mon, 23 Nov 2015 14:16:38 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2721 X-Received-Body-CRC: 4096944680 Xref: news.eternal-september.org comp.lang.ada:28506 Date: 2015-11-23T06:16:38-08:00 List-Id: On Monday, 23 November 2015 14:48:45 UTC+1, Dmitry A. Kazakov wrote: > On Mon, 23 Nov 2015 05:05:02 -0800 (PST), Serge Robyns wrote: >=20 > > On Monday, 23 November 2015 12:29:55 UTC+1, Dmitry A. Kazakov wrote: > >> On Mon, 23 Nov 2015 02:23:57 -0800 (PST), Serge Robyns wrote: > >>=20 > >>> I'm facing an issue with Ada when it comes to use an operation on two > >>> tagged types. > >>=20 > >> You can use tagged types, they cannot be dispatching arguments though.= That > >> is a big difference. > >>=20 > C++ code is broken, always broken, because C++ confuses T and T'Class and > hence re-dispatches each time and every place (except for ctors). Ada's > exact equivalent to >=20 > void account::update_balance (account_balance& ab, money amount) >=20 > is >=20 > procedure Update_Balance (X : in out Account; > AB : in out Account_Balance'Class, ...) >=20 This one did the trick. I do feel very frustrated with regards to the Ada = idiosyncrasies, if I may say so. Recalls me the "'" notation I had to use w= hen declaring a part of a constant that was from a parent class. I got thi= s trick in this newsgroup too. Trying to google on Ada "'" is a challenge = :-P. I'm wondering the best way to "learn" these without falling asleep while re= ading for the 10th time basic programming stuff and then missing that one i= mportant comment in the text.