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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9d303864ae4c70ad X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "okellogg" Newsgroups: comp.lang.ada Subject: Re: Reprise: 'in out' parameters for functions Date: 12 Jan 2005 07:15:23 -0800 Organization: http://groups.google.com Message-ID: <1105542923.381339.189580@z14g2000cwz.googlegroups.com> References: <107bdn6kk6rib2f@corp.supernews.com> NNTP-Posting-Host: 53.122.197.194 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1105542932 513 127.0.0.1 (12 Jan 2005 15:15:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Jan 2005 15:15:32 +0000 (UTC) In-Reply-To: <107bdn6kk6rib2f@corp.supernews.com> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=53.122.197.194; posting-account=-u2_lwwAAABUJ4VuqDyqjVgxu7dY1ZnH Xref: g2news1.google.com comp.lang.ada:7691 Date: 2005-01-12T07:15:23-08:00 List-Id: On Apr 8 2004, 1:32 pm, Randy Brukardt wrote: > > "Georg Bauhaus" wrote in message > news:c546fd$lkb$3@a1-hrz.uni-duisburg.de... > > Stephen Leake wrote: > > > > : Token : in out Token_List.List_Iterator) > > Is > > Token : access Token_List.List_Iterator) > > not an option? > > It's rarely an option, because it (a) forces a particular declaration > ('aliased') on users that have no need to know and (b) makes a messy call > with the need to use '[Unchecked_]Access in every call. > This triggers a different question: With Ada2005's support for object-dot-operation notation, will it be possible to write the following? package test is type obj_t is tagged private; function f (self : access obj_t) return integer; -- need 'access' mode here because f modifies self private -- ... end test; with test; procedure main is object : test.obj_t; retval : integer; begin retval := object.f; end main; My point here is whether main.object need be declared aliased or not. I would much prefer if it needn't be. Thanks, Oliver M. Kellogg