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: a07f3367d7,5ebeef2944e4167d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.75.8 with SMTP id y8mr5141306wiv.4.1346980966889; Thu, 06 Sep 2012 18:22:46 -0700 (PDT) MIME-Version: 1.0 Path: q11ni5513255wiw.1!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.mixmin.net!news2.arglkargh.de!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: anonymous aggregates? Date: Fri, 31 Aug 2012 17:37:48 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <85mx1bwec4.fsf@stephe-leake.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1346452676 6426 69.95.181.76 (31 Aug 2012 22:37:56 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 31 Aug 2012 22:37:56 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-08-31T17:37:48-05:00 List-Id: "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. ;-) I suspect that this was not done originally in Ada mainly because of concerns about arbitrarily introducing additional identifiers in the middle of other declarations. Not sure that's a real problem; there might be some weird visibility issues that arose. Randy.