From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ad4:5361:: with SMTP id e1mr8246644qvv.110.1596280969157; Sat, 01 Aug 2020 04:22:49 -0700 (PDT) X-Received: by 2002:ac8:cc6:: with SMTP id o6mr8172044qti.70.1596280968984; Sat, 01 Aug 2020 04:22:48 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 1 Aug 2020 04:22:48 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a02:c7d:897d:6600:98ac:5ba3:51fa:e494; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl NNTP-Posting-Host: 2a02:c7d:897d:6600:98ac:5ba3:51fa:e494 References: <94a54092-a56f-4a99-aaec-08dd611c8fd8@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Proposal: Auto-allocation of Indefinite Objects From: Stephen Davies Injection-Date: Sat, 01 Aug 2020 11:22:49 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:59621 List-Id: On Friday, 31 July 2020 at 11:20:09 UTC+1, Dmitry A. Kazakov wrote: > On 31/07/2020 11:25, Stephen Davies wrote: > > On Friday, 3 April 2020 at 23:48:43 UTC+1, Stephen Davies wrote: > > Perhaps a better way to think of this is as a discriminated record without > > an explicit discriminant? In which case maybe a different syntax than "new" > > would be appropriate? > That is right, but it would be a much larger problem to resolve than > your original proposal. > First, Ada lacks necessary discriminants ... > Second, Ada's object initialization process has no means to determine > discriminants... > Third, there is still the problem that task components do not work... > All in one, the crude work-around has always been an access type... Maybe I'm missing something but my thought was maybe there is no need for a named discriminant, e.g. type Node_Type (<>) is record Item : Element_Type; Prev : Node_Ptr_Type; Next : Node_Ptr_Type; end record; The rules for such records would be the same as for discriminated ones, except that instead of usages needing to provide values for discriminants, they would need to provide values for indefinite components.