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,75f02dbbddbbdc88 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.190.2 with SMTP id gm2mr3642070pbc.4.1323918010661; Wed, 14 Dec 2011 19:00:10 -0800 (PST) Path: lh20ni23724pbb.0!nntp.google.com!news2.google.com!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.sovam.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Alex Mentis" Newsgroups: comp.lang.ada Subject: Re: Pop function Date: Thu, 15 Dec 2011 03:00:10 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <27517259.83.1323907586856.JavaMail.geo-discussion-forums@yqgn9> <30092575.120.1323912907099.JavaMail.geo-discussion-forums@yqja5> Mime-Version: 1.0 Injection-Date: Thu, 15 Dec 2011 03:00:10 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="gfgFYuCPiLXMU3e9SKyWUQ"; logging-data="21533"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18HPUQKAid9tq848NGBZMZ6HU4Tm+pMFqs=" User-Agent: XanaNews/1.19.1.320 Cancel-Lock: sha1:LRO42UgwncG0d3CSZJ/wXhHCjnY= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Date: 2011-12-15T03:00:10+00:00 List-Id: Alex Mentis wrote: > Rego, P. wrote: > > > > Your public interface should never use access types. > > > Anonymous types are a bad idea. > > Why so does the language allow it? Currently I could not think a > > better way of running over a pointer list: > > Instead of > > type T_List is > record > Next : access T_List; > Item : Integer; > end record; > T_List_Ptr is access T_List; > > you should use an incomplete declaration (ARM 3.10.1): > > type T_List; -- incomplete declaration > > type T_List_Ptr is access T_List; > > type T_List is > record > Next : T_List_Ptr; > Item : Integer; > end record; > > > -Alex I meant to add, that would alleviate a lot of the type conversion you're doing.