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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,73175d2d01a1b1dd X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.38.134 with SMTP id g6mr7134322pbk.6.1317742452263; Tue, 04 Oct 2011 08:34:12 -0700 (PDT) Path: lh7ni11407pbb.0!nntp.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!news2.euro.net!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: subprogram must not be deeper than access type Date: Tue, 4 Oct 2011 17:34:28 +0200 Organization: cbb software GmbH Message-ID: <18lpded4rc8ub.1m3os6ozt7mi6$.dlg@40tude.net> References: <818752663338654817.822041rmhost.bauhaus-maps.arcor.de@news.arcor.de> <15r7hdzgyr0fc.1djn7vwy23dfg$.dlg@40tude.net> <1uqthqxzri6j3.i18ifhbwmzdc.dlg@40tude.net> <10bj41auuxi17$.42qw3wdubqn3.dlg@40tude.net> <4e8b21fc$0$6571$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18292 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-10-04T17:34:28+02:00 List-Id: On Tue, 04 Oct 2011 17:10:51 +0200, Georg Bauhaus wrote: > On 04.10.11 09:58, Dmitry A. Kazakov wrote: > >> ------------------------------ >> BTW, the list of parameters of a subprogram is an anonymous record type, >> but Ada does not require its explicit declaration, e.g. >> >> type Integer_Tuple is record >> Left : Integer; >> Right : Integer; >> end record; >> function "+" : Integer_Tuple return Integer; > > To better meet programmer expectations, functions could then > return lists of values as objects of a similar anonymous > record type. Sure, the result(s) belongs there. > (Left, Right) := Explode (Argument); > > With accessors, this is more interesting. Let F2 > return a pair of accessorable (?) objects: Down with accessors. The language should simply support sugars like: F (X) := G (Y) --> F[Index] (X, G (Y)) After prefix notation was introduced, there is no reason why other shortcuts should not be allowed. Specifically to accessors they are mess already. Would you try to figure out how two accessors in a tuple of would interact? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de