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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8522260ffbf09d84 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-05 00:29:57 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Problem With Self-Referential Access-to-Subprogram Type Date: Wed, 05 Nov 2003 09:31:53 +0100 Message-ID: <20chqvglnrae8njr0011cfg3a8hc82je7m@4ax.com> References: <80teqv099lspc5d4osf2gmu7cld46i0lvb@4ax.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1068020996 45904880 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:2068 Date: 2003-11-05T09:31:53+01:00 List-Id: On Tue, 04 Nov 2003 14:52:33 +0000, Marius Amado Alves wrote: >On Tue, 2003-11-04 at 14:24, Dmitry A.Kazakov wrote: >> Yes, there is a difference. Technically, for an out parameter the >> compiler should still know the object constraints. > >Only at runtime. Consider Ada.Text_IO.Get (Item : out String). What >constraints is the compiler knowing here? It knows that there are bounds which cannot be changed. If Item were of String (1..5) the compiler would probably choose another way of parameter passing than for String (<>) with the consequence that the stack frame would be different. I suppose, that one could allow premature use of types. Even as evil as: type X; type Y is record What_Is_That : X; end Y; but the price would be too high. We will have 10,000 pages of ARM to describe it and a pair or two halting problems to solve. (:-)) --- Regards, Dmitry Kazakov www.dmitry-kazakov.de