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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Fri, 11 Aug 2017 11:12:57 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <1395655516.524005222.638450.laguest-archeia.com@nntp.aioe.org> <1502382504.2184.6.camel@obry.net> <466561720.524077501.729508.laguest-archeia.com@nntp.aioe.org> NNTP-Posting-Host: MajGvm9MbNtGBKE7r8NgYA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:47704 Date: 2017-08-11T11:12:57+02:00 List-Id: On 2017-08-11 10:53, Stefan.Lucks@uni-weimar.de wrote: > On Fri, 11 Aug 2017, Dmitry A. Kazakov wrote: > >>> function Calculate(A, B, C: Integer; D, E, F: Float) return Numeric; >>> -- returns either Integer or Float >> [...] >> >> This looks awful to me. > > Well, I didn't say I would like that. But the OP asked for the ad-hoc > creation of anonymous tuples, as in > > function Calculate(A, B, C: Integer; D, E, F: Float) > return (Integer or Float); > > (without actually suggesting a specific syntax; the syntax is mine), and > my point was, that if you want tuples for Ada, you should ask to define > them as proper types, rather than as ad-hoc anonymous types. I don't disagree but types must have meaning. In some cases they don't. And why the tuple used in arguments: A, B, C: Integer; D, E, F: Float does not need to have a type? To me tuples are more about handling assorted lists like arguments are results. Also there are many co-types which need not to be named. To name few T'Base T'Class T'Access T'Interface T'Public_Parent (N) T'Array_Element T'Array_Index (D) T'Array_Range (D) T'Record_Member (N) T'Discriminants_List T'Access_Target_Type T'Access_Pool_Type T'Arguments_List T'Result_Type -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de