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,be02bcdb8f46ddd5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!newsfeeds.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada References: <311c6b78.0409271138.1795d07c@posting.google.com> Subject: Re: An improved Ada? Date: Mon, 27 Sep 2004 16:40:40 -0400 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: <41587840$0$74186$39cecf19@news.twtelecom.net> Organization: Time-Warner Telecom NNTP-Posting-Date: 27 Sep 2004 20:29:52 GMT NNTP-Posting-Host: 617e0acd.news.twtelecom.net X-Trace: DXC=K;fB078fhJ:2=0o6GZ=PX5C_A=>8kQj6=MOj3YM9`=a8co=dW1mZJ32dYZAA8S: "jn" wrote in message news:311c6b78.0409271138.1795d07c@posting.google.com... > > after spending numerous hours to do a simple double linked list > package - yes, I have seen charles - a 5 hours tedious car drive came > up with the following example of an improved Ada language: > - prefix notation (as for tasks and protected types) > - Ada OO syntax in line with tasks and protected objects > - reference types > - controlled, allocates from Storage_Pools.Garbage_Collected :) > - implicit up- and down-conversions Distinguished-receiver syntax is being added to the language, for tagged types. L : List; begin L.Append (42); This is largely the reason why we made the AI-302 container types publicly tagged. Tagged types and limited types are already pass-by-reference, so usually you don't need explicit reference types (a la C++), since the pass-by-reference happens automatically. The fact that the type is publicly tagged means that you're allowed to alias parameters: procedure Op (L : in out List) is begin ... L'Access ...; --ok end; For class-wide types, the up-conversion happens automatically, since the ancester class-wide type "covers" its descendent, e.g. type T is tagged null record; type NT is new T with null record; procedure Op (O : T'Class); declare O : NT; begin Op (O); --ok end; All the AI-302 containers (including the list) are controlled, so memory management ("garbage collection") is automatic. Not sure what your issue is, I guess...