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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,342dcd67e9ca73ee X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: tagged record child: override constructor? Date: Fri, 16 Sep 2005 17:33:08 +0200 Organization: Adalog Message-ID: References: <1126591134.797303.318920@z14g2000cwz.googlegroups.com> <1uri5gd2n7om0.1ujkzb26ayxdx.dlg@40tude.net> <1126625009.709876.226260@f14g2000cwb.googlegroups.com> <225337460.SlYKbeB8eD@linux1.krischik.com> <87vf14him5.fsf@ludovic-brenta.org> <1idpvzxcxfckw.mrs8nw3eu4ks$.dlg@40tude.net> <13wyu4lwsmzmz.ktc3t2av54yv$.dlg@40tude.net> <1126705974.984997.227590@z14g2000cwz.googlegroups.com> <1126718176.448703.193860@g44g2000cwa.googlegroups.com> <1aroipmwspnb8.zqxtxhb4t06u$.dlg@40tude.net> <1126731371.081850.90860@g44g2000cwa.googlegroups.com> <12v93t1k4i81i$.sm5jmg8q3lpk$.dlg@40tude.net> <1126790380.573573.78220@g44g2000cwa.googlegroups.com> <1w82ustqd4vak$.mv9c3tcxa6sx.dlg@40tude.net> <1126810455.448696.262570@g44g2000cwa.googlegroups.com> <1126882356.112798.288440@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1126886509 19690 195.25.228.57 (16 Sep 2005 16:01:49 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 16 Sep 2005 16:01:49 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en In-Reply-To: <1126882356.112798.288440@g14g2000cwa.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:4803 Date: 2005-09-16T17:33:08+02:00 List-Id: Hyman Rosen a �crit : > Irrelevant. When the paramater is of a specific class type > and you pass a derived type as an argument, the parameter > simply receives a copy of the base part of the argument. > It's referred to as "slicing". And just as you claim to prefer, > once that happens there is no going back to the derived type. > The parameter is well and truly only of its declared type. > Not at all. You receive a *view*, not a copy (as you noted above, tagged types are always passed by reference). If you convert it to T'Class, it will dispatch according to its run-time type (i.e. the tag is not changed by parameter-passing - even if the parameter is of a specific type). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr