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 X-Google-Thread: a07f3367d7,f428ff2031155951 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.158.31.10.MISMATCH!newsfeed-0.progon.net!progon.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed01.chello.at!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Equivalent of dynamic_cast (downcast) for tagged types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <375fb596-ab12-4cb0-a190-53d62b94b2e4@e9g2000vbi.googlegroups.com> Date: Thu, 27 Jan 2011 18:35:51 +0100 Message-ID: <16cvdzm2xrbmo$.ssez6prunha9$.dlg@40tude.net> NNTP-Posting-Date: 27 Jan 2011 18:35:52 CET NNTP-Posting-Host: 84b5af89.newsspool2.arcor-online.net X-Trace: DXC=RiS4[nHM8e0RadXUBHgFh3A9EHlD;3Yc24Fo<]lROoR18kF[QW]VAJnGg3GQMgo:N0A93 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16744 Date: 2011-01-27T18:35:52+01:00 List-Id: On Thu, 27 Jan 2011 18:10:49 +0100, J-P. Rosen wrote: > I see no objection in Ada, where tags are checked, and I have some > pretty convincing examples of that. One objection is that if tags are checked manually in an if-statement (unfortunately there is no way to use tags or equivalents in the case-statement, which is a long story to tell), there is a danger that some alternatives could remain uncovered or handled in an unexpected way. Arguably the cases, which indeed exist, should rather be addressed by multiple dispatch and extensible operations. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de