From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE, XPRIO autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: New aggregates with Ada 2022. Date: Fri, 1 Jul 2022 00:20:05 -0500 Organization: A noiseless patient Spider Message-ID: References: <1f894a48-b213-46d8-960f-6e97732e6105n@googlegroups.com> Injection-Date: Fri, 1 Jul 2022 05:20:07 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="9123a2ec3f96b64caac063b20870daed"; logging-data="2304610"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pxv1Z+9W9xhFg1MdwvzGaWP9BY29pBkY=" Cancel-Lock: sha1:jzLSBBCq+aPz3JFe63m+oJ/L+l0= X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:64066 List-Id: "Marius Amado-Alves" wrote in message news:1f894a48-b213-46d8-960f-6e97732e6105n@googlegroups.com... > "... It would be better if slices were implemented as a form of function, > so that they can be used when they make sense... (My post-Ada language > design includes variable-returning functions, so that sort of need can be > accomadated.)" > (Randy) > > What is a "variable-returning function"? I've imagined that "variable" and "static" are keywords that can be used like "constant" to declare objects. (And "constant" is the default, not variable.) Once you have that, it makes sense to allow those in function returns: function Foo ... return constant Integer; function Bar ... return variable Integer; Bar returns a variable, which simply means that you can write into it as well as read it. Semantically, it is similar to Ada's anonymous access types, except that it isn't an access type, so you can't convert it to one (with all of the loss of checking that implies). >Is there available material on this post-Ada language design of yours? No. It was a pandemic project (when I was essentially stuck at home), and I never made a version for public consumption (I wanted to gather more input on it before making it widely available). It's obvious that it would be quite time-consuming to do that (and I'm not the best explainer of ideas anyway - I tend to ramble... :-). So I never finished it (having gotten too busy completing Ada 2022 work). Randy.