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.19.234 with SMTP id 103mr3753336iot.87.1511013609050; Sat, 18 Nov 2017 06:00:09 -0800 (PST) X-Received: by 10.157.33.82 with SMTP id l18mr245405otd.6.1511013608934; Sat, 18 Nov 2017 06:00:08 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.kjsl.com!usenet.stanford.edu!d140no366252itd.0!news-out.google.com!193ni817iti.0!nntp.google.com!i6no373462itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 18 Nov 2017 06:00:08 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83c6:b0e7:61cf:6ca1:f741:c1cc; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83c6:b0e7:61cf:6ca1:f741:c1cc References: <591a9389-a4b8-43fa-b963-0ebb9e488be1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4ecc08f1-bbf3-46e2-ad31-a930d90da310@googlegroups.com> Subject: Re: Ada.Real_Time.Time_Last From: AdaMagica Injection-Date: Sat, 18 Nov 2017 14:00:09 +0000 Content-Type: text/plain; charset="UTF-8" Xref: feeder.eternal-september.org comp.lang.ada:48988 Date: 2017-11-18T06:00:08-08:00 List-Id: Am Samstag, 18. November 2017 14:18:44 UTC+1 schrieb Niklas Holsti: > On 17-11-18 15:06 , AdaMagica wrote: > > Am Freitag, 17. November 2017 22:39:51 UTC+1 schrieb Niklas Holsti: > > > >> Long ago, I suggested (on c.l.a) an Ada extension by which a package > >> could declare private types using the same classes of types that can be > >> used for generic formal types. That would IMO not only be useful for > >> programmers, it could formalise some of the informal text in the Ada RM. > >> For example, RM A.4.8 defines the type Ada.Direct_IO.Count as > >> > >> type Count is range 0 .. implementation defined; > >> > >> With the suggested extension, this could be written in legal (extended) > >> Ada as > >> > >> type Count is private range <>; > >> > >> That form still does not show that Count'First = 0, but with a little > >> further extension one could perhaps leave only the upper bound > >> unspecified, as in: > >> > >> type Count is private range 0 .. <>; > >> > >> Perhaps it is time for me to revive this proposal... > >> > > Problem with this is that private types have no predefined operators. > > That is a problem with private types in *current* Ada, where a private > type is fully "opaque". This proposal is meant to remove this problem, > by letting the programmer provide more information about the private > type, in the same way as information can now be provided about generic > formal types, to equip those types with predefined operators that can be > used in the generic. Yes - but what do we gain with this new syntax? Is it worth the effort? Which problem does it solve (to rephrase Randy)?