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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: A bad counterintuitive behaviour of Ada about OO Date: Wed, 6 Aug 2014 09:26:16 +0200 Organization: cbb software GmbH Message-ID: <1ohy7vnbntskq$.h139ov04mlxu$.dlg@40tude.net> References: <932kntuq5rrr.8sumwibqrufn.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: ot/DC7n2aCvt5pcTM4dZCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:188182 Date: 2014-08-06T09:26:16+02:00 List-Id: On Wed, 06 Aug 2014 00:11:33 +0300, Victor Porton wrote: > Dmitry A. Kazakov wrote: > >> On Tue, 05 Aug 2014 23:09:40 +0300, Victor Porton wrote: >> >>> Why Ada behaves in this counter-intuitive way? >> >> Because it is C++ code written in Ada. >> >>> What should I do in similar situations when developing real Ada software? >> >> Never re-dispatch, never cast types, unless you exactly know what are you >> doing. > > Your answer is "negative". You say what not to do. > > But I am seeking a positive answer: what should I do in this situation, when > writing real software? It could be answered if you stated the problem. You wrote about "counterintuitive" behavior. What "intuitive" behavior would be. Remember that OO features in practically all OOPL are broken. Ada is the only language I know which implements OO consistently in a properly typed way. P.S. Controlled wrappers around external references is a quite simple thing, if not trivial. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de