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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.133.101 with SMTP id h98mr10219550iod.51.1521659851490; Wed, 21 Mar 2018 12:17:31 -0700 (PDT) X-Received: by 2002:a9d:5f17:: with SMTP id f23-v6mr1317288oti.12.1521659851324; Wed, 21 Mar 2018 12:17:31 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!u184-v6no1748666ita.0!news-out.google.com!d3-v6ni1347itf.0!nntp.google.com!199-v6no2191146itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Mar 2018 12:17:31 -0700 (PDT) In-Reply-To: <7e240e01-f6e2-40dc-a7da-d430d1c92f67@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <7789c58e-ca36-44a2-8818-009eface4a3e@googlegroups.com> <926b83eb-6cce-417d-9c17-df6be2bc98d5@googlegroups.com> <2d1f392f-e747-42aa-8938-d6538d5b9934@googlegroups.com> <7e240e01-f6e2-40dc-a7da-d430d1c92f67@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3ff0cd7d-c3c5-4b03-a686-3cb21f3fbfa6@googlegroups.com> Subject: Re: Ada-Oriented GUI From: Shark8 Injection-Date: Wed, 21 Mar 2018 19:17:31 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:51107 Date: 2018-03-21T12:17:31-07:00 List-Id: On Wednesday, March 21, 2018 at 12:43:51 PM UTC-6, briot.e...@gmail.com wro= te: > I was also working on similar similar at the time (starting with promises= (https://github.com/briot/Ada-promises, though there's also a branch there= were I started to look at reactive programming). >=20 > For me, the biggest obstacles were the need to instantiate a lot of gener= ics, because the streams are associated with data, then get combined to cre= ate other types of data, and so on. So we ended up with a soup of instantia= tions (on the user side), which I had not quite managed to tame. I had an idea about that, though even if I submit it now it wouldn't be put= in Ada 2020 -- but anyway, the idea was a sort of automatic instantiation. Given Generic Type Some_Type is private; Procedure Generic_Swap( A, B : in out Some_Type ); you could say Generic Type Element is private; Type Index is (<>); Type Array_Type is Array(Index range <>) of Element; USE Procedure Swap is new Generic_Swap( Element ); Procedure Generic_Sort( Input : in out Array_Type ); --... Type Integer_Array is new Array(Integer range <>) of Integer; Procedure Sort is new Generic_Sort( Integer, Integer, Integer_Array ); where the USE would instantiate Swap in Sort's instantiation; Swap itself c= ould be reached via Sort.Swap and used in that manner, thereby cleaning up = a lot of one-off instantiations.