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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Fri, 11 Aug 2017 08:24:19 +0200 Organization: A noiseless patient Spider 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> Reply-To: nonlegitur@notmyhomepage.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 11 Aug 2017 06:20:08 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a49a54c9784353c0ec8436ecd4857116"; logging-data="31569"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WBTCIKydgTL35JM8ZLEuVp255q+B0aGE=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Cancel-Lock: sha1:BFXZrFPT2gmsl/C8u4MWRMw6qgY= Xref: news.eternal-september.org comp.lang.ada:47697 Date: 2017-08-11T08:24:19+02:00 List-Id: On 11.08.17 03:31, Randy Brukardt wrote: > Speaking of evil, anonymous types are evil. Why is it hard to declare a > record type for this purpose? A record is mutable, a tuple isn't meant to be mutable (i.e., can't update it's components). Also, it is harder to start from good types and names than to use a continous improvement process that finds them. A tuple language will first let programmers write return Integer, Float, or -> (Int, Float) or int, float function; and then let them use these values "generically": anything that takes an integer and a floating point value will work: argument pattern matching, or referring to Fst and Snd component using built-in ".0" and ".1" suffix notation. It then does not matter whether the integers and FPT values really are of types (apples, prices) or (oranges, weight)... It is convenient. It is prone to logical errors, because it'll make lazy programmers stop making good use of the type system, i.e. it eases accidentally mistaking apples for oranges, or price for weight, IOW make reasonably errors. It is, therefore, a very viable scheme of language based supportbusiness. OTOH, if (int, float) tuples used in the implementation of an ADT only, then the convenience might loose some of the disadvantages of depending on tuples.