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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5ebeef2944e4167d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.107.167 with SMTP id hd7mr1053056wib.0.1346980966961; Thu, 06 Sep 2012 18:22:46 -0700 (PDT) Path: q11ni5513255wiw.1!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.138.MISMATCH!xlned.com!feeder5.xlned.com!border-1.ams.xsnews.nl!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!newsfeed.straub-nv.de!feed.xsnews.nl!border-2.ams.xsnews.nl!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 01 Sep 2012 11:57:48 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: anonymous aggregates? References: <85mx1bwec4.fsf@stephe-leake.org> In-Reply-To: Message-ID: <5041dc1d$0$6578$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 01 Sep 2012 11:57:49 CEST NNTP-Posting-Host: 317bcf44.newsspool3.arcor-online.net X-Trace: DXC=3;^=m^cXinGA@P]\DMcF=Q^Z^V3H4Fo<]lROoRA8kFWRE0Pj]@PCY\c7>ejVHHUh9f5\=h5OkkP[\AbIaFK X-Complaints-To: usenet-abuse@arcor.de Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-09-01T11:57:49+02:00 List-Id: On 01.09.12 00:37, Randy Brukardt wrote: > "Stephen Leake" wrote in message > news:85mx1bwec4.fsf@stephe-leake.org... > ... >> If we introduce the notion of "anonymous aggregates" (styled after >> "anonymous arrays"), we could do this: > > I'd be more likely to call this idea an "anonymous record" as that is the > obvious counterpart to "anonymous array". > > declare > function Foo return > record > A : Integer; > B : Float; > end record > is begin > return > (A => 1, > B => 2.0); > end Foo; > > (As a side-benefit, there'd be less griping about not repeating the name in > a record declaration. ;-) Wouldn't we be passing objects of anonymous_type_1 that right now cannot be assigned to anything of anonymous_type_2? At least not without resorting to types being the same if they happen use the same structure (and component names?), thus giving up Ada's notion of type equivalence.