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,e528d54e6cc3c10d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: why only in-parameters in functions Date: Thu, 30 Sep 2004 09:41:44 +0200 Message-ID: <2gxbotroo6ys.9rx8k6ted8w2$.dlg@40tude.net> References: <87oejoye2e.fsf@deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de HWfkhLy0sdijq5d2PvPF5AFZ2Espr4Y9BMuywFhukX1efjc88= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:4429 Date: 2004-09-30T09:41:44+02:00 List-Id: On Wed, 29 Sep 2004 23:12:41 +0200, Florian Weimer wrote: > The "Rosen trick" is also relevant in this context (see the archives), > but it only works for limited types. However, it should be used > whenever possible because it does not involve erroneous execution. Yes. However, using Rosen trick with derived types could face problems. When an function (primitive operation) has to be overridden, then to access the argument to be modified, one should either cast (bad) or dispatch (assuming that the self-pointer is class-wide.) I.e. in fact, the function is class-wide, though declared as a primitive one. It is not good, not a clean design. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de